improve styling of stroke view & file tabs

This commit is contained in:
sheaf 2024-11-03 12:28:47 +01:00
parent 74a8ad3f80
commit aeb7a425f2
3 changed files with 19 additions and 11 deletions

View file

@ -348,6 +348,10 @@ To specify it in CSS, set the box-shadow of the contents node."
padding-left: 10px; padding-left: 10px;
} }
.metabrush .listViewPane {
font-size: 12px;
}
.metabrush .listViewPane :selected { .metabrush .listViewPane :selected {
background-color: unset; background-color: unset;
font-weight: bold; font-weight: bold;
@ -454,7 +458,7 @@ To specify it in CSS, set the box-shadow of the contents node."
/* File bar */ /* File bar */
.metabrush .fileBar { .metabrush .fileBar {
min-height: 24px; min-height: 24px;
font-size: 12px; font-size: 11px;
margin-top: 2px; margin-top: 2px;
} }
@ -462,6 +466,7 @@ To specify it in CSS, set the box-shadow of the contents node."
border-top: 2px solid @bg; border-top: 2px solid @bg;
} }
.metabrush .fileBarTab:hover { .metabrush .fileBarTab:hover {
border-color: @active; border-color: @active;
} }
@ -469,6 +474,7 @@ To specify it in CSS, set the box-shadow of the contents node."
.metabrush .activeTab { .metabrush .activeTab {
border-color: @base; border-color: @base;
background-color: @active; background-color: @active;
/* font-weight: bold; */
} }
.metabrush .activeTab:hover { .metabrush .activeTab:hover {
@ -476,7 +482,8 @@ To specify it in CSS, set the box-shadow of the contents node."
} }
.metabrush .fileBarTab label { .metabrush .fileBarTab label {
margin-left: 4px; margin-left: 10px;
margin-top: 2px;
color: @plain; color: @plain;
} }
@ -598,7 +605,7 @@ To specify it in CSS, set the box-shadow of the contents node."
.metabrush :selected .layer-item, .metabrush :selected .brush-item { .metabrush :selected .layer-item, .metabrush :selected .brush-item {
color: black; color: black;
background-color: @contrast; background-color: @contrast;
border: 0px solid @contrast; border-color: @contrast;
} }
/* Add "drop here" areas when a drag has been initiated */ /* Add "drop here" areas when a drag has been initiated */
@ -626,13 +633,11 @@ To specify it in CSS, set the box-shadow of the contents node."
} }
/* Style when dragging brush over an item */ /* Style when dragging brush over an item */
.dragging-brush .drag-top.layer-item, .dragging-brush .drag-bot.layer-item { .dragging-brush .drag-over.layer-item {
border-top: 2px solid @brushStroke; box-shadow: unset;
border-bottom: 2px solid @brushStroke; box-shadow:
border-left: 0px; inset 8px -8px 2px -6px @brushStroke,
border-right: 0px; inset -8px 8px 2px -6px @brushStroke;
margin-top: -2px;
margin-bottom: -2px;
background-color: @brushStroke; background-color: @brushStroke;
} }

View file

@ -99,6 +99,7 @@ editableLabelNew txt = do
-- Make the label not editable to start with, -- Make the label not editable to start with,
-- because we want it to be editable on double-clicks not single clicks. -- because we want it to be editable on double-clicks not single clicks.
GTK.editableSetEditable label False GTK.editableSetEditable label False
widgetAddClasses label [ "monospace" ]
return label return label
where where

View file

@ -52,6 +52,8 @@ import MetaBrush.Brush
( SomeBrush ) ( SomeBrush )
import qualified MetaBrush.Asset.Brushes as Brushes import qualified MetaBrush.Asset.Brushes as Brushes
( brushes ) ( brushes )
import MetaBrush.GTK.Util
( widgetAddClasses )
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
@ -120,7 +122,7 @@ newBrushView rootWindow vars mkDND_data = mdo
brushBox <- GTK.boxNew GTK.OrientationHorizontal 10 brushBox <- GTK.boxNew GTK.OrientationHorizontal 10
GTK.listItemSetChild listItem ( Just brushBox ) GTK.listItemSetChild listItem ( Just brushBox )
GTK.widgetAddCssClass brushBox "brush-item" widgetAddClasses brushBox [ "brush-item", "monospace" ]
brushLabel <- GTK.labelNew ( Nothing @Text ) brushLabel <- GTK.labelNew ( Nothing @Text )
GTK.boxAppend brushBox brushLabel GTK.boxAppend brushBox brushLabel