[taffybar] Update CSS for workspace auto size image
This commit is contained in:
parent
4d9ea9acbe
commit
8d8120fbda
@ -4,40 +4,26 @@
|
||||
@define-color urgent-window-color #D9CB9E;
|
||||
@define-color font-color #FFFFFF;
|
||||
|
||||
.Contents {
|
||||
padding-bottom: 2px;
|
||||
padding-top: 2px;
|
||||
padding-right: 2px;
|
||||
padding-left: 2px;
|
||||
transition: border-color .5s, background-color .5s;
|
||||
border-radius: 5px;
|
||||
border-style: solid;
|
||||
border-width: 1px;
|
||||
border-color: rgba(1.0, 1.0, 1.0, 0.0);
|
||||
}
|
||||
|
||||
.Active .Contents, .Visible .Contents {
|
||||
background-color: rgba(0.0, 0.0, 0.0, 0.5);
|
||||
}
|
||||
|
||||
.Contents {
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.InnerPad {
|
||||
padding-bottom: 12px;
|
||||
padding-top: 12px;
|
||||
padding-left: 4px;
|
||||
padding-right: 4px;
|
||||
}
|
||||
|
||||
.Workspaces .InnerPad {
|
||||
padding-bottom: 5px;
|
||||
padding-top: 5px;
|
||||
padding-left: 2px;
|
||||
padding-right: 2px;
|
||||
}
|
||||
|
||||
.Contents {
|
||||
padding-bottom: 4px;
|
||||
padding-top: 4px;
|
||||
padding-right: 2px;
|
||||
padding-left: 2px;
|
||||
transition: background-color .5s;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.Active .Contents, .Visible .Contents {
|
||||
background-color: rgba(0.0, 0.0, 0.0, 0.5);
|
||||
}
|
||||
|
||||
.WorkspaceLabel {
|
||||
padding-right: 3px;
|
||||
padding-left: 2px;
|
||||
@ -98,6 +84,8 @@
|
||||
.IconImage {
|
||||
transition: opacity .5s, background-color .5s;
|
||||
opacity: 1;
|
||||
padding-bottom: 1px;
|
||||
padding-top: 1px;
|
||||
}
|
||||
|
||||
.IconContainer {
|
||||
@ -112,7 +100,7 @@
|
||||
/* background-color: rgba(255, 255, 255, 0.3); */
|
||||
border-radius: 0px;
|
||||
opacity: 1;
|
||||
box-shadow: inset 0 -2px #FFFFFF;
|
||||
box-shadow: inset 0 -1px #FFFFFF;
|
||||
}
|
||||
|
||||
.IconContainer.Urgent {
|
||||
|
@ -53,6 +53,13 @@ import Text.Printf
|
||||
import Text.Read hiding (lift)
|
||||
import Unsafe.Coerce
|
||||
|
||||
buildContentsBox widget = liftIO $ do
|
||||
contents <- Gtk.hBoxNew False 0
|
||||
Gtk.containerAdd contents widget
|
||||
_ <- widgetSetClass contents "Contents"
|
||||
Gtk.widgetShowAll contents
|
||||
buildPadBox contents
|
||||
|
||||
setMinWidth width widget = liftIO $ do
|
||||
Gtk.widgetSetSizeRequest widget width (-1)
|
||||
return widget
|
||||
@ -157,11 +164,8 @@ main = do
|
||||
workspaces = workspacesNew myWorkspacesConfig
|
||||
baseConfig = defaultSimpleTaffyConfig
|
||||
{ startWidgets =
|
||||
[ flip widgetSetClass "Workspaces" =<< workspaces
|
||||
, layout >>= buildPadBox
|
||||
, windows >>= buildPadBox
|
||||
]
|
||||
, endWidgets = map (>>= buildPadBox)
|
||||
workspaces : map (>>= buildContentsBox) [ layout, windows ]
|
||||
, endWidgets = map (>>= buildContentsBox)
|
||||
[ textClockNew Nothing "%a %b %_d %r" 1
|
||||
, textBatteryNew "$percentage$% ($time$)"
|
||||
, batteryIconNew
|
||||
|
Loading…
Reference in New Issue
Block a user