From af5d6b683f1ac01ed5e957d2d2d8f3b4a3d72b64 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Thu, 8 Jun 2017 17:09:47 +0200 Subject: [PATCH] DPIfy all themes (mostly zenburn) This makes sure that all sizes that are specified in themes go through the dpi() function. For most themes this just means that the value 0 is DPIfied, which should not make much of a difference. However, for zenburn this actually adds the very first calls to dpi() to this theme. Fixes: https://github.com/awesomeWM/awesome/issues/1807 Signed-off-by: Uli Schlachter --- themes/default/theme.lua | 2 +- themes/sky/theme.lua | 2 +- themes/zenburn/theme.lua | 9 +++++---- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/themes/default/theme.lua b/themes/default/theme.lua index 0a6b1792f..b0be48012 100644 --- a/themes/default/theme.lua +++ b/themes/default/theme.lua @@ -24,7 +24,7 @@ theme.fg_focus = "#ffffff" theme.fg_urgent = "#ffffff" theme.fg_minimize = "#ffffff" -theme.useless_gap = 0 +theme.useless_gap = dpi(0) theme.border_width = dpi(1) theme.border_normal = "#000000" theme.border_focus = "#535d6c" diff --git a/themes/sky/theme.lua b/themes/sky/theme.lua index c7d531766..0aa7d1bd6 100644 --- a/themes/sky/theme.lua +++ b/themes/sky/theme.lua @@ -25,7 +25,7 @@ theme.fg_focus = "#2e3436" theme.fg_urgent = "#2e3436" theme.fg_minimize = "#2e3436" -theme.useless_gap = 0 +theme.useless_gap = dpi(0) theme.border_width = dpi(2) theme.border_normal = "#dae3e0" theme.border_focus = "#729fcf" diff --git a/themes/zenburn/theme.lua b/themes/zenburn/theme.lua index af10fae60..2b6fa08a8 100644 --- a/themes/zenburn/theme.lua +++ b/themes/zenburn/theme.lua @@ -4,6 +4,7 @@ ------------------------------- local themes_path = require("gears.filesystem").get_themes_dir() +local dpi = require("beautiful.xresources").apply_dpi -- {{{ Main local theme = {} @@ -24,8 +25,8 @@ theme.bg_systray = theme.bg_normal -- }}} -- {{{ Borders -theme.useless_gap = 0 -theme.border_width = 2 +theme.useless_gap = dpi(0) +theme.border_width = dpi(2) theme.border_normal = "#3F3F3F" theme.border_focus = "#6F6F6F" theme.border_marked = "#CC9393" @@ -66,8 +67,8 @@ theme.mouse_finder_color = "#CC9393" -- Variables set for theming the menu: -- menu_[bg|fg]_[normal|focus] -- menu_[border_color|border_width] -theme.menu_height = 15 -theme.menu_width = 100 +theme.menu_height = dpi(15) +theme.menu_width = dpi(100) -- }}} -- {{{ Icons