简体   繁体   English

Awesome-WM:具有Radical的上下文菜单的位置

[英]Awesome-WM: Position of context menus with Radical

I'm currently trying to make myself familiar with the Radical menu subsystem of Awesome Window Manager. 我目前正在尝试使自己熟悉Awesome Window Manager的Radical菜单子系统 I want to create a simple menu like the ones you could also make with awful.menu. 我想创建一个简单的菜单,就像用awful.menu也可以创建的菜单一样。 My code looks like this (of course this is not the complete config file, but the relevant parts of it): 我的代码如下所示(当然,这不是完整的配置文件,而是其中的相关部分):

local radical = require("radical")

local menu = radical.context {
    style      = radical.style.classic,
    item_style = radical.item.style.arrow_single ,
    layout     = radical.layout.vertical,
}

menu:add_item {text="Item 1"}
menu:add_item {text="Item 2"}
menu:add_item {text="Item 3"}

local menutextbox = wibox.widget.textbox("Menu")
menutextbox:set_menu(menu, "button::pressed", 1)

I then include the menutextbox into my wibar. 然后,将menutextbox包含到我的wibar中。 However, when I click on it, the menu always opens in the upper left corner. 但是,当我单击它时,菜单始终在左上角打开。 I tried to set the position manually with menu.x and menu.y, but this didn't change anything. 我尝试使用menu.x和menu.y手动设置位置,但这没有任何改变。 So, how can I change the position of the menu from the corner to the widget which opens it? 那么,如何将菜单的位置从角落更改为打开菜单的小部件?

Better report a bug in the project repository with your Awesome version. 使用您的Awesome版本更好地报告项目存储库中的错误。 Given the lack of effort to keep up with the newer Awesome changes, it might very well just be broken for your version. 由于缺乏与最新的Awesome更改保持一致的努力,因此您的版本可能会被破坏。

I have a (local) branch with some newer fixes for Awesome v4.3, but it still has some regressions. 我有一个(local)分支,其中包含一些针对Awesome v4.3的较新修复程序,但仍然有一些退化。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM