Merge pull request #1823 from psychon/dpi

Honor DPI for awful.menu
This commit is contained in:
Daniel Hahler 2017-06-09 01:53:08 +02:00 committed by GitHub
commit 2852ad30f5
4 changed files with 10 additions and 9 deletions

View File

@ -116,7 +116,7 @@ local function load_theme(a, b)
ret.border = a.border_color or b.menu_border_color or b.border_normal or
fallback.menu_border_color or fallback.border_normal
ret.border_width= a.border_width or b.menu_border_width or b.border_width or
fallback.menu_border_width or fallback.border_width or 0
fallback.menu_border_width or fallback.border_width or dpi(0)
ret.fg_focus = a.fg_focus or b.menu_fg_focus or b.fg_focus or
fallback.menu_fg_focus or fallback.fg_focus
ret.bg_focus = a.bg_focus or b.menu_bg_focus or b.bg_focus or
@ -130,9 +130,9 @@ local function load_theme(a, b)
ret.submenu = a.submenu or b.menu_submenu or b.submenu or
fallback.menu_submenu or fallback.submenu or ""
ret.height = a.height or b.menu_height or b.height or
fallback.menu_height or 16
fallback.menu_height or dpi(16)
ret.width = a.width or b.menu_width or b.width or
fallback.menu_width or 100
fallback.menu_width or dpi(100)
ret.font = a.font or b.font or fallback.font
for _, prop in ipairs({"width", "height", "menu_width"}) do
if type(ret[prop]) ~= "number" then ret[prop] = tonumber(ret[prop]) end

View File

@ -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"

View File

@ -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"

View File

@ -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