Source files icons follow dark themes again.

[DEVELOPMENT ENVIRONMENT]
* NEW: Image editor: Add an invert button for testing the dark version of an icon.
* BUG: Project tree: Source files icons follow dark themes again.
* NEW: Project tree: Make bigger source files icons.
This commit is contained in:
gambas 2021-02-27 22:48:41 +01:00 committed by Christof Thalhofer
parent f957a9be1d
commit c81609a985
13 changed files with 476 additions and 233 deletions

File diff suppressed because it is too large Load diff

View file

@ -31,7 +31,7 @@ Component=gb.signal
Description="Integrated Development Environment for Gambas" Description="Integrated Development Environment for Gambas"
Authors="Benoît Minisini\nFabien Bodard\nCharlie Reinl\nJosé Luis Redrejo\nRobert Rowe\nTobias Boege" Authors="Benoît Minisini\nFabien Bodard\nCharlie Reinl\nJosé Luis Redrejo\nRobert Rowe\nTobias Boege"
Arguments=[["-L"],["-t","/home/benoit/gambas/git/master/app/src/gambas3"],["--help"]] Arguments=[["-L"],["-t","/home/benoit/gambas/git/master/app/src/gambas3"],["--help"]]
Environment="GB_GUI=gb.qt5\n GTK_DEBUG=interactive" Environment="GB_GUI=gb.gtk3\n GTK_DEBUG=interactive"
TabSize=2 TabSize=2
Translate=1 Translate=1
Language=en Language=en

View file

@ -3,7 +3,7 @@
Public Path As String Public Path As String
Public RichText As String Public RichText As String
Public Enum EFFECT_BALANCE, EFFECT_COLORIZE, EFFECT_DESATURATE, EFFECT_TRANSPARENT Public Enum EFFECT_BALANCE, EFFECT_COLORIZE, EFFECT_DESATURATE, EFFECT_TRANSPARENT, EFFECT_INVERT
Private Enum TRANS_FLIP_H, TRANS_FLIP_V, TRANS_ROTATE_L, TRANS_ROTATE_R Private Enum TRANS_FLIP_H, TRANS_FLIP_V, TRANS_ROTATE_L, TRANS_ROTATE_R
Property Read ReadOnly As Boolean Property Read ReadOnly As Boolean
@ -2645,6 +2645,10 @@ Public Sub ApplyEffect(iEffect As Integer)
hEffect = $hImage.Copy().Erase() hEffect = $hImage.Copy().Erase()
Case EFFECT_INVERT
hEffect = $hImage.Copy().Invert(True)
End Select End Select
If $hSelect Then If $hSelect Then
@ -3212,6 +3216,9 @@ Public Sub ExecAction(sAction As String)
Case "transparent" Case "transparent"
ApplyEffect(EFFECT_TRANSPARENT) ApplyEffect(EFFECT_TRANSPARENT)
Case "invert"
ApplyEffect(EFFECT_INVERT)
End Select End Select
End End

View file

@ -241,19 +241,26 @@
ToolTip = ("Make transparent") ToolTip = ("Make transparent")
Picture = Picture["icon:/small/transparency"] Picture = Picture["icon:/small/transparency"]
} }
{ btnDarkTheme ToolButton btnAction
Name = "btnDarkTheme"
MoveScaled(24,0,4,4)
Tag = "invert"
ToolTip = ("Invert colors for dark themes")
Picture = Picture["icon:/small/invert"]
}
{ Separator5 Separator { Separator5 Separator
MoveScaled(25,0,1,4) MoveScaled(35,0,1,4)
} }
{ btnLineCap ToolButton { btnLineCap ToolButton
MoveScaled(27,0,4,4) MoveScaled(37,0,4,4)
ToolTip = ("Line cap") ToolTip = ("Line cap")
} }
{ btnLineJoin ToolButton { btnLineJoin ToolButton
MoveScaled(33,0,4,4) MoveScaled(43,0,4,4)
ToolTip = ("Line join") ToolTip = ("Line join")
} }
{ btnFillRule ToolButton { btnFillRule ToolButton
MoveScaled(39,0,4,4) MoveScaled(49,0,4,4)
ToolTip = ("Fill rule") ToolTip = ("Fill rule")
} }
} }
@ -596,9 +603,9 @@
Text = ("Grid resolution") Text = ("Grid resolution")
} }
{ txtGridRes SliderBox { txtGridRes SliderBox
MoveScaled(29,0,26,4) MoveScaled(38,0,17,4)
MinValue = 4 MinValue = 4
MaxValue = 512 MaxValue = 128
Step = 4 Step = 4
Value = 64 Value = 64
} }
@ -611,7 +618,7 @@
Text = ("Grid snap") Text = ("Grid snap")
} }
{ txtGridSnap SliderBox { txtGridSnap SliderBox
MoveScaled(29,0,26,4) MoveScaled(38,0,17,4)
MinValue = 1 MinValue = 1
MaxValue = 512 MaxValue = 512
Step = 8 Step = 8

View file

@ -1205,6 +1205,7 @@ Public Sub MakeModuleIcon(sModule As String, iSize As Integer, Optional bStartup
If Not hImage Then If Not hImage Then
hImage = Image.Load("img/module" &/ sModule & ".png").Stretch(iSize, iSize) hImage = Image.Load("img/module" &/ sModule & ".png").Stretch(iSize, iSize)
If Application.DarkTheme Then hImage = hImage.Invert(True)
'If bExported Then MakeExportedIcon(hImage) 'If bExported Then MakeExportedIcon(hImage)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 594 B

After

Width:  |  Height:  |  Size: 963 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 136 B

After

Width:  |  Height:  |  Size: 149 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 368 B

After

Width:  |  Height:  |  Size: 531 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 165 B

After

Width:  |  Height:  |  Size: 338 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 161 B

After

Width:  |  Height:  |  Size: 179 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 222 B

After

Width:  |  Height:  |  Size: 482 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 673 B

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 304 B

After

Width:  |  Height:  |  Size: 1.9 KiB