From a92e5df543c148be13ed9ce3f7dc7e77a00be6ad Mon Sep 17 00:00:00 2001 From: RMT Date: Wed, 16 Sep 2020 18:16:32 +0800 Subject: [PATCH] stict height of clock widget --- theme/fly/layout/topbar.lua | 2 +- theme/fly/widget/clock.lua | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/theme/fly/layout/topbar.lua b/theme/fly/layout/topbar.lua index 42a1668..6934956 100644 --- a/theme/fly/layout/topbar.lua +++ b/theme/fly/layout/topbar.lua @@ -40,7 +40,7 @@ function topbar:init(config) startup:init({ height = self.height, screen = config.screen }) control_center:init({ height = self.height }) tasklist:init({ screen = config.screen, height = self.height }) - clock:init({ bg = beautiful.topbar_bg }) + clock:init({ bg = beautiful.topbar_bg, height = self.height * 0.7 }) systray:init({ screen = config.screen, width = self.width, height = self.height }) layoutbox:init({ height = self.height }) hotkeys_popup:init({}) diff --git a/theme/fly/widget/clock.lua b/theme/fly/widget/clock.lua index 52fc1d1..3d7aed8 100644 --- a/theme/fly/widget/clock.lua +++ b/theme/fly/widget/clock.lua @@ -4,10 +4,11 @@ local beautiful = require("beautiful") local clock = {} function clock:init(config) - clock.widget = wibox.widget{ - wibox.widget{ - format = "%H:%M", - widget = wibox.widget.textclock + clock.widget = wibox.widget { + wibox.widget { + format = "%H:%M", + widget = wibox.widget.textclock, + forced_height = config.height }, bg = config.bg, fg = "#000000",