【问题标题】:Awesome wm 4 middle align does not work in horizontal layout令人敬畏的 wm 4 中间对齐在水平布局中不起作用
【发布时间】:2017-11-05 01:24:18
【问题描述】:

在我之前很棒的安装(很棒的 3.5)中,我写了the configurations,它在版本 4 中不再以相同的方式工作。我会像这样在水平对齐中对齐容器:

local center_layout = wibox.layout.fixed.horizontal()
local left_layout = wibox.layout.fixed.horizontal()
local right_layout = wibox.layout.fixed.horizontal()
-- Fill layouts with widgets


local layout = wibox.layout.align.horizontal()

layout:set_left(left_layout)
layout:set_right(right_layout)
layout:set_middle(center_layout)

但是 center_layout 是靠左对齐而不是像这样居中:

我也试过用

替换上面的代码
local layout = wibox.widget {
    left_layout  ,
    center_layout ,
    right_layout  ,
    layout  = wibox.layout.align.horizontal
}

但它并没有做任何改变

【问题讨论】:

    标签: user-interface lua scripting window-managers awesome-wm


    【解决方案1】:

    【讨论】:

      【解决方案2】:

      我在任何地方都找不到示例,但 @ulishlachter 的回答让我走到了最后一英里:

      s.mywibox3:setup({
        layout = wibox.layout.align.horizontal,
        expand = 'outside',
        nil,
        {
          layout = wibox.layout.fixed.horizontal,
          todowidget,
          space,
          pomowidget,
        },
        nil,
      })
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2015-12-17
        • 2021-03-06
        • 1970-01-01
        • 1970-01-01
        • 2019-09-10
        • 1970-01-01
        • 1970-01-01
        • 2017-08-14
        相关资源
        最近更新 更多