Update scrollableDictionaryIconBar.hs
This commit is contained in:
parent
3308c0569d
commit
6155f2902b
1 changed files with 20 additions and 0 deletions
|
|
@ -36,12 +36,32 @@ createIconToolbar' iconPaths = do
|
|||
toolbar <- Gtk.boxNew Gtk.OrientationHorizontal 0
|
||||
Gtk.widgetSetHalign toolbar Gtk.AlignCenter
|
||||
Gtk.widgetSetValign toolbar Gtk.AlignCenter
|
||||
|
||||
cssProvider <- Gtk.cssProviderNew
|
||||
Gtk.cssProviderLoadFromString cssProvider $ T.pack $
|
||||
".classic-button {"
|
||||
++ " -gtk-appearance: none;"
|
||||
++ " background-image: linear-gradient(to bottom, #f3f3f3, #d8d8d8);"
|
||||
++ " border: 1px solid #bbb;"
|
||||
++ " border-radius: 4px;"
|
||||
++ " color: #333;"
|
||||
++ " box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);"
|
||||
++ " padding: 4px 8px;"
|
||||
++ "}"
|
||||
++ ".classic-button:hover {"
|
||||
++ " background-image: linear-gradient(to bottom, #e6e6e6, #ccc);"
|
||||
++ "}"
|
||||
++ ".classic-button:active {"
|
||||
++ " background-image: linear-gradient(to bottom, #ccc, #e6e6e6);"
|
||||
++ "}"
|
||||
|
||||
|
||||
mapM_ (\path -> do
|
||||
icon <- Gtk.imageNewFromFile path
|
||||
Gtk.widgetSetSizeRequest icon 64 64 -- Force minimum size
|
||||
|
||||
btn <- Gtk.buttonNew
|
||||
Gtk.widgetAddCssClass btn "glass-button"
|
||||
Gtk.widgetSetSizeRequest btn 80 80 -- Button size (icon + padding)
|
||||
Gtk.widgetSetHalign btn Gtk.AlignCenter
|
||||
Gtk.widgetSetValign btn Gtk.AlignCenter
|
||||
|
|
|
|||
Loading…
Reference in a new issue