66 - XTextBox bad values sent to the gslc_ElemXSliderCreate()
MODIFY
builder/build.gradle
builder/build.gradle
@@ -15,7 +15,7 @@ apply plugin: 'org.junit.platform.gradle.plugin'
mainClassName = "builder.Builder"
applicationName = "GUIslice"
archivesBaseName = 'builder'
-version = '0.11.0-rc3'
+version = '0.11.0-rc4'
repositories {
mavenCentral()

MODIFY
builder/src/main/java/builder/common/FontFactory.java
builder/src/main/java/builder/common/FontFactory.java
@@ -104,18 +104,18 @@ public class FontFactory {
instance.readFonts(linuxCVS,linuxFonts,linuxMap);
// setup mono font tables
- MonoPlainSizes[0] = new Dimension(9,14);
- MonoPlainSizes[1] = new Dimension(13,19);
- MonoPlainSizes[2] = new Dimension(19,30);
- MonoPlainSizes[3] = new Dimension(26,39);
+ MonoPlainSizes[0] = new Dimension(11,14);
+ MonoPlainSizes[1] = new Dimension(14,19);
+ MonoPlainSizes[2] = new Dimension(21,30);
+ MonoPlainSizes[3] = new Dimension(28,39);
MonoBoldSizes[0] = new Dimension(11,16);
MonoBoldSizes[1] = new Dimension(14,22);
MonoBoldSizes[2] = new Dimension(21,31);
MonoBoldSizes[3] = new Dimension(28,41);
- MonoItalicSizes[0] = new Dimension(10,14);
- MonoItalicSizes[1] = new Dimension(13,20);
- MonoItalicSizes[2] = new Dimension(17,30);
- MonoItalicSizes[3] = new Dimension(25,39);
+ MonoItalicSizes[0] = new Dimension(11,14);
+ MonoItalicSizes[1] = new Dimension(14,20);
+ MonoItalicSizes[2] = new Dimension(21,30);
+ MonoItalicSizes[3] = new Dimension(28,39);
MonoBoldItalicSizes[0] = new Dimension(11,16);
MonoBoldItalicSizes[1] = new Dimension(14,22);
MonoBoldItalicSizes[2] = new Dimension(21,31);
@@ -377,9 +377,9 @@ public class FontFactory {
break;
}
} else {
- String acHeight = "a";
+ String acHeight = "p$";
String acWidth = "W";
- Font tmpFont = createFont("Monospaced", item.getLogicalSize(), item.getLogicalStyle());
+ Font tmpFont = createFont(item.getLogicalName(), item.getLogicalSize(), item.getLogicalStyle());
Dimension txtHeight = measureText(acHeight, tmpFont);
Dimension txtWidth = measureText(acWidth, tmpFont);
nChSz.width = txtWidth.width-4;

MODIFY
builder/src/main/java/resources/templates/arduino.t
builder/src/main/java/resources/templates/arduino.t
@@ -223,7 +223,7 @@ bool CbSlidePos(void* pvGui,void* pvElemRef,int16_t nPos)
// Create vertical scrollbar for textbox
pElemRef = gslc_ElemXSliderCreate(&m_gui,E_SCROLLBAR$<ID>,$<PAGE_ENUM>,&m_sXSlider[$<COUNT>],
- (gslc_tsRect){$<X>+$<WIDTH>-21,$<Y>+4,20,$<HEIGHT>-8},0,$<ROWS>,0,5,true);
+ (gslc_tsRect){$<X>+$<WIDTH>-21,$<Y>+4,20,$<HEIGHT>-8},0,100,0,5,true);
gslc_ElemSetCol(&m_gui,pElemRef,$<FRAME_COLOR>,$<FILL_COLOR>,$<GLOW_COLOR>);
gslc_ElemXSliderSetPosFunc(&m_gui,pElemRef,&CbSlidePos);
<STOP>

MODIFY
builder/src/main/java/resources/templates/arduino_min.t
builder/src/main/java/resources/templates/arduino_min.t
@@ -232,7 +232,7 @@ bool CbSlidePos(void* pvGui,void* pvElemRef,int16_t nPos)
// Create vertical scrollbar for textbox
gslc_ElemXSliderCreate_P(&m_gui,E_SCROLLBAR$<ID>,$<PAGE_ENUM>,$<X>+$<WIDTH>-21,$<Y>+4,20,$<HEIGHT>-8,
- 0,$<ROWS>,0,5,true,$<FRAME_COLOR>,$<FILL_COLOR>);
+ 0,100,0,5,true,$<FRAME_COLOR>,$<FILL_COLOR>);
pElemRef = gslc_PageFindElemById(&m_gui,E_PG_MAIN,E_SCROLLBAR$<ID>);
gslc_ElemXSliderSetPosFunc(&m_gui,pElemRef,&CbSlidePos);
<STOP>

MODIFY
builder/src/main/java/resources/templates/linux.t
builder/src/main/java/resources/templates/linux.t
@@ -231,7 +231,7 @@ bool CbSlidePos(void* pvGui,void* pvElemRef,int16_t nPos)
// Create vertical scrollbar for textbox
pElemRef = gslc_ElemXSliderCreate(&m_gui,E_SCROLLBAR$<ID>,$<PAGE_ENUM>,&m_sXSlider[$<COUNT>],
- (gslc_tsRect){$<X>+$<WIDTH>-21,$<Y>+4,20,$<HEIGHT>-8},0,$<ROWS>,0,5,true);
+ (gslc_tsRect){$<X>+$<WIDTH>-21,$<Y>+4,20,$<HEIGHT>-8},0,100,0,5,true);
gslc_ElemSetCol(&m_gui,pElemRef,$<FRAME_COLOR>,$<FILL_COLOR>,$<GLOW_COLOR>);
gslc_ElemXSliderSetPosFunc(&m_gui,pElemRef,&CbSlidePos);
<STOP>

66 - XTextBox bad values sent to the gslc_ElemXSliderCreate()