From acc5dfb4ba646eb448d1df3db0ebdc39f449490d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Minisini?= Date: Thu, 11 Jun 2015 21:22:57 +0000 Subject: [PATCH] [GB.GUI.BASE] * BUG: ScrollArea: The corner widget is now correctly hidden in all cases. * BUG: GridView: Picture alignment inside cells is now correct. git-svn-id: svn://localhost/gambas/trunk@7128 867c0c6c-44f3-4631-809d-bfa615b0a4ec --- comp/src/gb.gui.base/.icon.png | Bin 3754 -> 2937 bytes comp/src/gb.gui.base/.project | 3 +- .../gb.gui.base/.src/GridView/GridView.class | 8 +-- comp/src/gb.gui.base/.src/ScrollArea.class | 4 ++ comp/src/gb.gui.base/.src/Test/FMain.class | 44 +++++++++----- comp/src/gb.gui.base/.src/Test/FMain.form | 56 +----------------- comp/src/gb.gui.base/.startup | 2 +- 7 files changed, 43 insertions(+), 74 deletions(-) diff --git a/comp/src/gb.gui.base/.icon.png b/comp/src/gb.gui.base/.icon.png index 8748600ba47d0a4a6ca32a923a53fa6a66dfa7fd..a77322c4013192211086db9fcc8ce0c72b9235e5 100644 GIT binary patch delta 2913 zcmV-n3!e0<9r+fJB#|@}e+w%~L_t(|ob8%>Y#hgZ$3OG9J073nQ+$bfQlu!!k|O^)UD~{sCX^}WiS|e>ypfK73Z4DPF+5}LL76tlH3$zLPPyA|7rwJX{4xF@>?K+K1 z%d*H&lBpNPw@8W)k>ZiOz1!QJ=^sZ@$I~f|WQwdmVvJ??I#UpJf5ovsy-P&M=mLM%G-kJz+uOdWv2bZr;G5gN#iC*iuIuya(Jz;L zG5wm(_y-G~xqSfuHkEv||1UDZi^KA;Dhhq*%mD|!V=0-^837 z1vqj<#uJ7~=l_TUFA`A~IASG7!~(-^6rjC9^yW_zbyk)Se~e8_X#a@@+|+t;@Gs7M zGcT;a00ibLwUUK`mE{5e3Exhno=!PlllYq-4ovQ>$x*2;Z!9@W-nu0~3T9G{Iny`e z>kqn}>6RXMK|T=BVnqs&@N6XY+*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g2tJPjw}Q;6FBR8t9ywU)+H0a9}dsXVrqs8CETo{LnMrwTL@QXz(t zAv?kZq!PiwlBu2mGGM(4G?1Fx_N)fjM=QwlCtJ{rfWYR zRMnDx!y1e`o|>9^gg23%hU0kpdP$hE0IVG#Lf}#og+pasD~DeB3sbYR@we9zF@{;C z3n%Ek4?{^I2CH9kzz6hefFwA~5~!F~P+ZEIxr=c}yyT^%BICT6NSKtidT#bAZolbg2gj_u>~ zYwrDYB|Qs-v_rv2Gb#$;7iQ>f$k^)XNVwe|?pk>#&;5QQuG!ZS^_?Qq?I98gBZMG1 zHJ#6sMXvgVBH?8HF~$tI=s!$916>zH}?bXYtB z5C}ylMICc~Tdl7!XeC2lkM06Ua@$|5ohdhH0Ao#GAfm9=3V+a1#u~1=9Wnx>u*wQ4 zgb+5tW%^*i1bVu!C+WfYq=U35JG<_2kVLVXw%bms=EJdf6I93{l@p) ziIb)|c5t)Q)kgq;5;hX_t2+k_{b8>gH~}07nt;%VH6V(9p*{3#faEN@$*(|I`bh{6v;Yug zjPHNoSBt=(gdqnvE&>(8Yzu-`n5A9AwyW??tQzj6^&-gyRI+^xU^u_wo)hGA{kk)mJ_KA5O!B3REXv8UO$Q07*qoM6N<$f+R5v As{jB1 diff --git a/comp/src/gb.gui.base/.project b/comp/src/gb.gui.base/.project index 5ad7c1dea..dedf6aad8 100644 --- a/comp/src/gb.gui.base/.project +++ b/comp/src/gb.gui.base/.project @@ -1,12 +1,13 @@ # Gambas Project File 3.0 # Compiled with Gambas 3.7.90 Title=gb.gui.base -Startup=FGridView +Startup=FMain Version=3.7.90 VersionFile=1 Component=gb.image Component=gb.gui Environment="GB_GUI=gb.qt5\nLIBOVERLAY_SCROLLBAR=0" TabSize=2 +Language=fr Type=Component Packager=1 diff --git a/comp/src/gb.gui.base/.src/GridView/GridView.class b/comp/src/gb.gui.base/.src/GridView/GridView.class index 644320d7d..56994a2af 100644 --- a/comp/src/gb.gui.base/.src/GridView/GridView.class +++ b/comp/src/gb.gui.base/.src/GridView/GridView.class @@ -185,15 +185,15 @@ End Private Sub DrawAlignedPicture(hPict As Picture, X As Integer, Y As Integer, W As Integer, H As Integer, A As Integer) If Align.IsBottom(A) Then - Y = H - hPict.H + Y += H - hPict.H Else If Align.IsMiddle(A) Then - Y = Y + (H - hPict.H) / 2 + Y += (H - hPict.H) / 2 Endif If Align.IsRight(A) Then - X = W - hPict.W + X += W - hPict.W Else If Align.IsCenter(A) Then - X = X + (W - hPict.W) / 2 + X += (W - hPict.W) / 2 Endif Paint.DrawPicture(hPict, X, Y) diff --git a/comp/src/gb.gui.base/.src/ScrollArea.class b/comp/src/gb.gui.base/.src/ScrollArea.class index 7c657c081..ade4b824d 100644 --- a/comp/src/gb.gui.base/.src/ScrollArea.class +++ b/comp/src/gb.gui.base/.src/ScrollArea.class @@ -111,6 +111,7 @@ Public Sub _new() $hVBar.Step = Desktop.Scale $hCorner = New DrawingArea(Me) + $hCorner.Hide Me.Proxy = $hDrawingArea Me._Container = $hDrawingArea @@ -294,6 +295,9 @@ RETRY: If $bHBarVisible And If $bVBarVisible Then $hCorner.Move($hVBar.X, $hHBar.Y, SB, SB) + $hCorner.Show + Else + $hCorner.Hide Endif $bNoArrange = False diff --git a/comp/src/gb.gui.base/.src/Test/FMain.class b/comp/src/gb.gui.base/.src/Test/FMain.class index 82fda16af..053aaae08 100644 --- a/comp/src/gb.gui.base/.src/Test/FMain.class +++ b/comp/src/gb.gui.base/.src/Test/FMain.class @@ -1,21 +1,35 @@ ' Gambas class file +Public Sub _new() +End Public Sub Form_Open() - - HSplit1.Layout = [1, 1] - -End - -Public Sub Button1_Click() - - TextArea1.Visible = Not TextArea1.Visible - -End - -Public Sub Form_Close() - - Debug String[](HSplit1.Layout).Join(",") - + + ' GridView test + GridView1.Columns.Count = 3 + GridView1.Rows.Count = 1 + GridView1.Columns.Width = GridView1.Width + GridView1.Rows[0].Height = 52 + 'GridView1.Rows[0].Height = GridView1.Height + GridView1[0, 0].Picture = Picture["pattern/14.png"] + GridView1[0, 1].Picture = Picture["pattern/14.png"] + GridView1[0, 2].Picture = Picture["pattern/14.png"] + '' Good + GridView1[0, 0].Alignment = Align.Center + GridView1[0, 1].Alignment = Align.Center + GridView1[0, 2].Alignment = Align.Center + + GridView1[0, 0].Alignment = Align.Left + GridView1[0, 1].Alignment = Align.Left + GridView1[0, 2].Alignment = Align.Left + '' No Good + ' GridView1[0, 0].Alignment = Align.Right + ' GridView1[0, 1].Alignment = Align.Right + ' GridView1[0, 2].Alignment = Align.Right + + ' GridView1[0, 0].Alignment = Align.TopRight + ' GridView1[0, 1].Alignment = Align.TopRight + ' GridView1[0, 2].Alignment = Align.TopRight + End diff --git a/comp/src/gb.gui.base/.src/Test/FMain.form b/comp/src/gb.gui.base/.src/Test/FMain.form index 1646063e6..04e13829d 100644 --- a/comp/src/gb.gui.base/.src/Test/FMain.form +++ b/comp/src/gb.gui.base/.src/Test/FMain.form @@ -1,58 +1,8 @@ # Gambas Form File 3.0 { Form Form - MoveScaled(0,0,82,59) - Arrangement = Arrange.Vertical - { HBox1 HBox - MoveScaled(2,1,70,4) - { Button1 Button - MoveScaled(0,0,16,4) - Text = ("Button1") - } - } - { HBox2 HBox - MoveScaled(2,7,73,4) - { CheckBox1 CheckBox - MoveScaled(1,1,20,3) - Action = "test" - } - { CheckBox2 CheckBox - MoveScaled(22,1,20,3) - Action = "check" - } - { ToggleButton1 ToggleButton - MoveScaled(42,0,19,4) - Action = "test" - } - } - { HSplit1 HSplit - MoveScaled(4,12,68,40) - Expand = True - Border = False - { TextArea1 TextArea - MoveScaled(5,8,16,16) - Text = ("TextArea1") - } - { TextArea2 TextArea - MoveScaled(26,14,16,16) - Text = ("TextArea2") - } - { TextArea3 TextArea - MoveScaled(43,11,16,16) - Text = ("TextArea3") - } - } -} - -# Gambas Action File 3.0 - -{ Actions - { Action check - Text = "" - Picture = "$CheckBox" - } - { Action test - Text = "" - Picture = "$CheckBox" + MoveScaled(0,0,50,50) + { GridView1 GridView + MoveScaled(3,12,33,18) } } diff --git a/comp/src/gb.gui.base/.startup b/comp/src/gb.gui.base/.startup index 5547db2d6..47ab8153d 100644 --- a/comp/src/gb.gui.base/.startup +++ b/comp/src/gb.gui.base/.startup @@ -1,4 +1,4 @@ -FGridView +FMain gb.gui.base 0 0