From efcd92ddc904d11092e7d91f18431ffea095f5be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Minisini?= Date: Sat, 16 Sep 2023 22:15:55 +0200 Subject: [PATCH] More colors on the image editor color palette. Fix project tree refresh when adding a new file. [DEVELOPMENT ENVIRONMENT] * NEW: Image editor: Color palette now displays two lines of buttons. * NEW: Image editor: Picking a color on the screen automatically adds it to the color palette. * BUG: Project tree: Adding a new file correctly updates the tree now. --- app/src/gambas3/.src/Editor/Image/FImageProperty.class | 7 +++++++ app/src/gambas3/.src/Editor/Image/FImageProperty.form | 8 ++++---- app/src/gambas3/.src/Project.module | 2 +- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/app/src/gambas3/.src/Editor/Image/FImageProperty.class b/app/src/gambas3/.src/Editor/Image/FImageProperty.class index d1722478c..b1d972648 100644 --- a/app/src/gambas3/.src/Editor/Image/FImageProperty.class +++ b/app/src/gambas3/.src/Editor/Image/FImageProperty.class @@ -68,6 +68,7 @@ Public Sub _new() $aGradient.Add(CReportBrush["LinearGradient(0,0.5,1,0.5,[#000000,#FFFFFF],[0,1])"]) $aGradient.Add(CReportBrush["LinearGradient(0,0.5,1,0.5,[#000000,#FFFFFFFF],[0,1])"]) + palColor.Size = Desktop.Scale * 3 palColor.Colors = $aDefaultColor SetLineCap(Paint.LineCapButt) @@ -1614,3 +1615,9 @@ Private Sub LoadGrid() btnLockGrid.Value = Project.Config["/FImageProperty/Grid/Lock", 0] End + +Public Sub cchColor_Activate() + + RememberColor(cchColor.Value) + +End diff --git a/app/src/gambas3/.src/Editor/Image/FImageProperty.form b/app/src/gambas3/.src/Editor/Image/FImageProperty.form index e7549ac6f..60c25435f 100644 --- a/app/src/gambas3/.src/Editor/Image/FImageProperty.form +++ b/app/src/gambas3/.src/Editor/Image/FImageProperty.form @@ -18,22 +18,22 @@ Index = 0 Text = ("Color") { Panel3 Panel - MoveScaled(2,1,54,38) + MoveScaled(1,1,54,32) Expand = True Arrangement = Arrange.Vertical Spacing = True Margin = True { cchColor ColorChooser - MoveScaled(0,0,50,37) + MoveScaled(0,0,50,31) Expand = True Border = False } } { Separator8 Separator - MoveScaled(25,41,28,0) + MoveScaled(23,34,28,0) } { Panel8 Panel - MoveScaled(3,42,46,6) + MoveScaled(3,35,46,9) Arrangement = Arrange.Fill { palColor ColorPalette MoveScaled(0,0,44,6) diff --git a/app/src/gambas3/.src/Project.module b/app/src/gambas3/.src/Project.module index ec606925f..5abf7dd6e 100644 --- a/app/src/gambas3/.src/Project.module +++ b/app/src/gambas3/.src/Project.module @@ -2555,7 +2555,7 @@ Public Sub InsertFile(sName As String, sDir As String, Optional sTemplate As Str VersionControl.AddFile(sPath) Inc Project.TimeStamp - Refresh + RefreshKey(sPath) 'RefreshLibrary If Not bNoOpen Then OpenFile(sPath)