ice-wm / icewm

IceWM releases only, see Wiki
https://github.com/ice-wm/icewm/releases
Other
289 stars 16 forks source link

How to vertically center the clock? #151

Closed developer1105 closed 10 months ago

developer1105 commented 10 months ago

It is possible to vertically center the clock with thin taskbars, and/or using the font 'sans' ...

But in other cases (different fonts, taller/thicker taskbar) it is not possible to get a vertically centered clock. It appears positioned at the top of the "clock-box", and there is an empty space below it.

gijsbers commented 10 months ago

Can you give examples of themes and screenshots of the problem?

gijsbers commented 10 months ago

Names of the themes involved? Thanks!

developer1105 commented 10 months ago

First theme is BlueObscure

ThemeDescription="BlueObscure IceWM" ThemeAuthor="LuizFNunes"

Look=flat TitleBarHeight=30 TitleBarJustify=50 TitleButtonsLeft="i" TitleButtonsRight="xm" TitleButtonsSupported="xmir" BorderSizeX=4 BorderSizeY=4

CornerSizeX=24

CornerSizeY=16

DlgBorderSizeX=4 DlgBorderSizeY=4 RolloverButtonsSupported=1 MenuMouseTracking=1 TaskBarShowCollapseButton = 1 TaskBarGraphHeight = 36 # [16-1000]

Icons

MenuIconSize=16 SmallIconSize=16 LargeIconSize=32 HugeIconSize=48

Taskbar

TaskBarDoubleHeight=0 ShowAddressBar=0 TaskBarJustify="center" TaskBarWidthPercentage=100 PagerShowMinimized=0 PagerShowBorders=0 TaskBarClockLeds=1

Workspace

NormalWorkspaceFontNameXft="abel:size=12" ActiveWorkspaceFontNameXft="abel:size=12" ColorNormalWorkspaceButtonText="rgb:FF/FF/FF" ColorActiveWorkspaceButtonText="rgb:1C/1B/20"

Titlebar

ColorNormalBorder="rgb:3A/3E/42" ColorActiveBorder="rgb:1C/1B/20" ColorActiveTitleBar="rgb:1C/1B/20" ColorNormalTitleBar="rgb:3A/3E/42" ColorNormalTitleBarText="rgb:F0/F0/F0" ColorActiveTitleBarText="rgb:FF/FF/FF" TitleFontNameXft="abel:size=12:bold"

Menu

ColorNormalMenu="rgb:1C/1B/20" ColorActiveMenuItem="rgb:1C/1B/20" ColorNormalMenuItemText="rgb:FF/FF/FF" ColorActiveMenuItemText="rgb:00/00/00" ColorDisabledMenuItemText="rgb:25/24/29" MenuFontNameXft="abel:size=13"

Taskbar

ColorDefaultTaskBar="rgb:1C/1B/20" ColorNormalTaskBarApp="rgb:1C/1B/20" ColorNormalTaskBarAppText="rgb:FF/FF/FF" ColorActiveTaskBarApp="rgb:3A/3E/42" ColorActiveTaskBarAppText="rgb:05/D5/FC" ColorMinimizedTaskBarApp="rgb:1C/1B/20" ColorMinimizedTaskBarAppText="rgb:FF/FF/FF" NormalTaskBarFontNameXft="abel:size=14:condensed" ActiveTaskBarFontNameXft="abel:size=14:condensed" TrayDrawBevel=0

Listbox

ColorListBox="rgb:1C/1B/20" ColorListBoxText="rgb:FF/FF/FF" ColorListBoxSelection="rgb:05/D5/FC" ColorListBoxSelectionText="rgb:FF/FF/FF" ListBoxFontNameXft="abel:size=10"

Scrollbar

ColorScrollBar="rgb:1C/1B/20" ColorScrollBarSlider="rgb:3A/3E/42" ColorScrollBarButton="rgb:3A/3E/42" ColorScrollBarButtonArrow="rgb:FF/ff/ff"

Move Size Status

ColorMoveSizeStatus="rgb:3A/3E/42" ColorMoveSizeStatusText="rgb:FF/FF/FF" StatusFontNameXft="abel:size=10:bold"

QuickSwitch

ColorQuickSwitch="rgb:3A/3E/42" QuickSwitchFontNameXft="abel:size=10" ColorQuickSwitchText="rgb:FF/FF/FF" ColorQuickSwitchActive="rgb:1C/1B/20"

ToolTip

ColorToolTip="rgb:1C/1B/20" ColorToolTipText="rgb:FF/FF/FF" ToolTipFontNameXft="abel:size=13"

Dialog

ColorDialog="rgb:FF/FF/FF" ColorLabel="rgb:FF/FF/FF" ColorLabelText="rgb:1C/1B/20" ColorNormalButton="rgb:1C/1B/20" ColorNormalButtonText="rgb:FF/FF/FF" LabelFontNameXft="sans-serif:size=10" NormalButtonFontNameXft="abel:size=14" ActiveButtonFontNameXft="abel:size=14" InputFontNameXft="abel:size=10"

Desktop

DesktopBackgroundCenter=1 DesktopBackgroundScaled=1 DesktopBackgroundImage="default.png"

developer1105 commented 10 months ago

window

developer1105 commented 10 months ago

Second theme is yellowmotif

ThemeDescription="Not too flashy, not too boring" ThemeAuthor="Andreas Leitgeb avl@logic.at"

Look=motif

(warp3, warp4, win95; motif, nice, pixmap, metal, gtk)

Look=metal TitleBarHeight=24 TitleButtonsSupported="xmis" TitleBarHorzOffset=8 # -128-128 TaskBarGraphHeight = 34 # [16-1000]

BorderSizeX=4 BorderSizeY=4 CornerSizeX=22 CornerSizeY=22 DlgBorderSizeX=2 DlgBorderSizeY=2

DesktopBackgroundImage=""

DesktopBackgroundColor="rgb:40/a0/c0"

ClockFontNameXft=sans:size=14

ClockFontNameXft=helvetica:size=12

MenuFontNameXft="dejavusans:size=14"

MenuFontNameXft=sans-serif:size=14 NormalTaskBarFontNameXft="lucida:size=14" ActiveTaskBarFontNameXft="lucida:size=14"

ColorNormalBorder="rgb:C0/C0/C0" ColorActiveBorder="rgb:C0/C0/C0" ColorNormalButton="rgb:C0/C0/C0" ColorNormalTitleBar="rgb:C0/C0/C0" ColorActiveTitleBar="rgb:FF/E7/00" ColorNormalTitleBarText="rgb:00/00/00" ColorActiveTitleBarText="rgb:00/00/00" ColorNormalMenu="rgb:C0/C0/C0" ColorActiveMenuItem="rgb:A0/A0/A0" ColorNormalMenuItemText="rgb:00/00/00" ColorActiveMenuItemText="rgb:00/00/00" ColorDisabledMenuItemText="rgb:80/80/80" ColorMoveSizeStatus="rgb:C0/C0/C0" ColorMoveSizeStatusText="rgb:00/00/00" ColorDefaultTaskBar="rgb:C0/C0/C0" ColorNormalTaskBarApp="rgb:C0/C0/C0" ColorNormalTaskBarAppText="rgb:00/00/00" ColorActiveTaskBarApp="rgb:E0/E0/E0" ColorActiveTaskBarAppText="rgb:00/00/00" ColorMinimizedTaskBarApp="#C0C0C0" ColorMinimizedTaskBarAppText="#000000" ColorClock="#C0C0C0" ColorClockText="#000000"

developer1105 commented 10 months ago

window2

gijsbers commented 10 months ago

This change fixes it for me for the themes BlueObscure and yellowmotif. Thanks for pointing this problem out. I hope you enjoy this improvement.

developer1105 commented 10 months ago

Great! I was just wondering about ClockVertOffset and ClockHorzOffset (the same idea as TitleBarVertOffset), just in case it would be too hard to calculate the center position for each and every font/font-size out there. But anyways, good work!