From c6167e078562bf736c459b7e62555dbd5efc4b03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Minisini?= Date: Fri, 7 Dec 2012 01:40:44 +0000 Subject: [PATCH] [GB.FORM] * BUG: LCDLabel drwas its border even if there is no text. [GB.GUI.BASE] * BUG: Fix Draw.Circle() and Draw.Ellipse() end angle argument. git-svn-id: svn://localhost/gambas/trunk@5415 867c0c6c-44f3-4631-809d-bfa615b0a4ec --- app/src/gambas3/.src/Welcome/FAbout.form | 1 + app/src/gambas3/support.txt | 4 +-- comp/src/gb.form/.lang/.pot | 28 ++++++++++++++--- comp/src/gb.form/.project | 4 +-- comp/src/gb.form/.src/LCDLabel.class | 6 +++- comp/src/gb.form/.src/Test/FLCDLabel.class | 16 ++++++++++ comp/src/gb.form/.src/Test/FLCDLabel.form | 14 +++++---- comp/src/gb.form/.src/Test/FMain.form | 36 ++++++++++++++++++---- comp/src/gb.gui.base/.src/Draw.module | 6 ++-- 9 files changed, 90 insertions(+), 25 deletions(-) diff --git a/app/src/gambas3/.src/Welcome/FAbout.form b/app/src/gambas3/.src/Welcome/FAbout.form index 59c30dc93..5feb3791d 100644 --- a/app/src/gambas3/.src/Welcome/FAbout.form +++ b/app/src/gambas3/.src/Welcome/FAbout.form @@ -45,6 +45,7 @@ MoveScaled(4,125,68,11) Background = &HFFFFFF& ReadOnly = True + Wrap = True Border = False ScrollBar = Scroll.None } diff --git a/app/src/gambas3/support.txt b/app/src/gambas3/support.txt index db275c010..bd507d8e7 100644 --- a/app/src/gambas3/support.txt +++ b/app/src/gambas3/support.txt @@ -1,4 +1,4 @@ -51 Maurizio Da Lio +52 Maurizio Da Lio 37 GNU/Linex 33 Radoslav Dejanovic 18 Kari Laine @@ -12,6 +12,7 @@ 12 Eight Virtues 12 Laurent Carlier 12 Ricardo Díaz Martin +12 Gerry Douglas 10 Thierry Senges 10 Nando Favaro 9 Technical Racing Products @@ -20,7 +21,6 @@ 8 Two-Second Software 8 Boris Diskus 8 Jacky Tripoteau -8 Gerry Douglas 7 John Laurence 7 Roy Jones 7 Nicola Giacobbe diff --git a/comp/src/gb.form/.lang/.pot b/comp/src/gb.form/.lang/.pot index 3d2655c27..555584e65 100644 --- a/comp/src/gb.form/.lang/.pot +++ b/comp/src/gb.form/.lang/.pot @@ -235,12 +235,32 @@ msgstr "" msgid "TextBox1" msgstr "" -#: FLCDLabel.form:14 -msgid "ABCDEF" +#: FMain.form:22 +msgid "First wizard step" msgstr "" -#: FMain.form:17 -msgid "Expander1" +#: FMain.form:27 +msgid "What do you want to do?" +msgstr "" + +#: FMain.form:32 +msgid "Uninstall Windows" +msgstr "" + +#: FMain.form:37 +msgid "Uninstall Mac OSX" +msgstr "" + +#: FMain.form:42 +msgid "Install Linux" +msgstr "" + +#: FMain.form:45 +msgid "Étape n°2" +msgstr "" + +#: FMain.form:47 +msgid "Étape n°3" msgstr "" #: FMessage.form:39 diff --git a/comp/src/gb.form/.project b/comp/src/gb.form/.project index b05a18b72..eaf3a7e1e 100644 --- a/comp/src/gb.form/.project +++ b/comp/src/gb.form/.project @@ -1,7 +1,7 @@ # Gambas Project File 3.0 # Compiled with Gambas 3.3.90 Title=More controls for graphical components -Startup=FLCDLabel +Startup=FMain Version=3.3.90 VersionFile=1 Component=gb.image @@ -9,7 +9,7 @@ Component=gb.gui Component=gb.form Component=gb.settings Authors="Benoît Minisini" -Environment="GB_GUI=gb.qt4\nGB_STOCK=debug" +Environment="GB_GUI=gb.qt4\nGB_STOCK=debug\nLANG=C\nLC_ALL=C" TabSize=2 Translate=1 Language=en diff --git a/comp/src/gb.form/.src/LCDLabel.class b/comp/src/gb.form/.src/LCDLabel.class index 5ef1a8d03..b052e30f3 100644 --- a/comp/src/gb.form/.src/LCDLabel.class +++ b/comp/src/gb.form/.src/LCDLabel.class @@ -171,7 +171,7 @@ Public Sub View_Draw() W = $hView.W - iPad * 2 H = $hView.H - iPad * 2 - If W < 16 Or If H < 8 Or If Not $sText Then Return + If W < 16 Or If H < 8 Or If Not $sText Then Goto DRAW_BORDER For I = 1 To String.Len($sText) sCar = String.Mid$($sText, I, 1) @@ -204,6 +204,8 @@ Public Sub View_Draw() $iBg = GetRealBackground() $iLightBg = Color.Merge($iFg, $iBg, 0.9) + Paint.ResetClip + iLen = String.Len($sText) For I = 1 To iLen sCar = String.Mid$($sText, I, 1) @@ -222,6 +224,8 @@ Public Sub View_Draw() X += CW Next +DRAW_BORDER: + If $bBorder Then Draw.Rect(0, 0, $hView.W, $hView.H) Endif diff --git a/comp/src/gb.form/.src/Test/FLCDLabel.class b/comp/src/gb.form/.src/Test/FLCDLabel.class index f5baf4d70..38afdae26 100644 --- a/comp/src/gb.form/.src/Test/FLCDLabel.class +++ b/comp/src/gb.form/.src/Test/FLCDLabel.class @@ -1 +1,17 @@ ' Gambas class file + +Private $bColon As Boolean + +Public Sub Timer1_Timer() + + $bColon = Not $bColon + + LCDLabel2.Text = Format(Now, "hh" & If($bColon, ":", "") & "nn" & If($bColon, ":", "") & "ss") + +End + +Public Sub Form_Open() + + Timer1_Timer + +End diff --git a/comp/src/gb.form/.src/Test/FLCDLabel.form b/comp/src/gb.form/.src/Test/FLCDLabel.form index 75723f4b8..8069d4080 100644 --- a/comp/src/gb.form/.src/Test/FLCDLabel.form +++ b/comp/src/gb.form/.src/Test/FLCDLabel.form @@ -1,17 +1,19 @@ # Gambas Form File 3.0 { Form Form - MoveScaled(0,0,159,80) + MoveScaled(0,0,44,19) Arrangement = Arrange.Fill - { LCDLabel1 LCDLabel - MoveScaled(17,21,54,40) + { LCDLabel2 LCDLabel + MoveScaled(8,7,24,8) Background = &H000000& Foreground = &HFFFF00& - Text = ("ABCDEF") Alignment = Align.Center - Sheared = True Padding = 8 - Border = True HighlightColor = &HFF0000& } + { Timer1 #Timer + #MoveScaled(36,11) + Enabled = True + Delay = 500 + } } diff --git a/comp/src/gb.form/.src/Test/FMain.form b/comp/src/gb.form/.src/Test/FMain.form index a8d164f38..b75e04c1e 100644 --- a/comp/src/gb.form/.src/Test/FMain.form +++ b/comp/src/gb.form/.src/Test/FMain.form @@ -1,15 +1,39 @@ # Gambas Form File 3.0 { Form Form - Move(0,0,539,350) + Move(0,0,476,308) #Scaled = False + Arrangement = Arrange.Fill Spacing = True Margin = True - { Panel1 Panel - Move(56,35,371,245) - { Expander1 Expander - Move(7,7,322,210) - Text = ("Expander1") + { Wizard1 Wizard + Move(7,14,462,287) + Count = 3 + TextFont = Font["Bold,+4"] + ShowIndex = True + Index = 0 + Text = ("First wizard step") + { Label1 Label + Move(245,14,252,28) + Font = Font["Bold"] + Text = ("What do you want to do?") } + { RadioButton1 RadioButton + Move(245,42,168,28) + Text = ("Uninstall Windows") + } + { RadioButton2 RadioButton + Move(245,70,168,28) + Text = ("Uninstall Mac OSX") + } + { RadioButton3 RadioButton + Move(245,98,168,28) + Text = ("Install Linux") + } + Index = 1 + Text = ("Étape n°2") + Index = 2 + Text = ("Étape n°3") + Index = 0 } } diff --git a/comp/src/gb.gui.base/.src/Draw.module b/comp/src/gb.gui.base/.src/Draw.module index 0ca3c8fea..4d041e617 100644 --- a/comp/src/gb.gui.base/.src/Draw.module +++ b/comp/src/gb.gui.base/.src/Draw.module @@ -419,12 +419,10 @@ Private Sub DrawEllipse(iAction As Integer, X As Float, Y As Float, W As Float, hInfo = _GetInfo() - Angle = Start - Length = {End} - If Angle = 0 And If Length = 0 Then + If Start = 0 And If {End} = 0 Then Paint.Ellipse(X, Y, W, H, Angle, Pi(2), False) Else - Paint.Ellipse(X, Y, W, H, Angle, Length, True) + Paint.Ellipse(X, Y, W, H, Start, {End} - Start, True) Endif