Vertical padding size, used for spacing out elements in the window decorations.
Default is 3.
+*menu.overlap.x*
+ Horizontal overlap in pixels between submenus and their parents. A
+ positive value move submenus over the top of their parents, whereas a
+ negative value creates a gap between submenus and their parents.
+ Default is 0.
+
+*menu.overlap.y*
+ Vertical offset in pixels between submenus and their parents. Positive
+ values for downwards and negative for upwards. Default is 0.
+
*window.active.border.color*
Border color of active window
# general
border.width: 1
padding.height: 3
+menu.overlap.x: 0
+menu.overlap.y: 0
# window border
window.active.border.color: #dddad6
struct theme {
int border_width;
int padding_height;
+ int menu_overlap_x;
+ int menu_overlap_y;
+ /* colors */
float window_active_border_color[4];
float window_inactive_border_color[4];
float window_inactive_label_text_color[4];
enum lab_justification window_label_text_justify;
- /* buttons */
+ /* button colors */
float window_active_button_iconify_unpressed_image_color[4];
float window_active_button_max_unpressed_image_color[4];
float window_active_button_close_unpressed_image_color[4];
float osd_bg_color[4];
float osd_label_text_color[4];
+ /* textures */
struct wlr_texture *xbm_close_active_unpressed;
struct wlr_texture *xbm_maximize_active_unpressed;
struct wlr_texture *xbm_iconify_active_unpressed;
static void
menu_configure(struct menu *menu, int x, int y)
{
+ struct theme *theme = menu->server->theme;
+
menu->box.x = x;
menu->box.y = y;
menuitem->box.y = menu->box.y + offset;
offset += menuitem->box.height;
if (menuitem->submenu) {
- /* TODO: add offset to rc.xml */
- menu_configure(menuitem->submenu,
- menuitem->box.x + MENUWIDTH + 10,
- menuitem->box.y);
+ menu_configure(menuitem->submenu, menuitem->box.x
+ + MENUWIDTH - theme->menu_overlap_x,
+ menuitem->box.y + theme->menu_overlap_y);
}
}
{
theme->border_width = 1;
theme->padding_height = 3;
+ theme->menu_overlap_x = 0;
+ theme->menu_overlap_y = 0;
parse_hexstr("#dddad6", theme->window_active_border_color);
parse_hexstr("#f6f5f4", theme->window_inactive_border_color);
if (match(key, "padding.height")) {
theme->padding_height = atoi(value);
}
+ if (match(key, "menu.overlap.x")) {
+ theme->menu_overlap_x = atoi(value);
+ }
+ if (match(key, "menu.overlap.y")) {
+ theme->menu_overlap_y = atoi(value);
+ }
if (match(key, "window.active.border.color")) {
parse_hexstr(value, theme->window_active_border_color);