mirror of
https://github.com/labwc/labwc.git
synced 2025-11-04 13:30:07 -05:00
parent
fe8cdd7f8b
commit
55bf79c3fe
5 changed files with 24 additions and 6 deletions
14
src/osd.c
14
src/osd.c
|
|
@ -78,6 +78,7 @@ get_osd_height(struct wl_list *node_list)
|
|||
|
||||
/* Add OSD border width */
|
||||
height += 2 * rc.theme->osd_border_width;
|
||||
height += 2 * rc.theme->osd_window_switcher_padding;
|
||||
return height;
|
||||
}
|
||||
|
||||
|
|
@ -316,7 +317,7 @@ render_osd(struct server *server, cairo_t *cairo, int w, int h,
|
|||
|
||||
pango_cairo_update_layout(cairo, layout);
|
||||
|
||||
int y = theme->osd_border_width;
|
||||
int y = theme->osd_border_width + theme->osd_window_switcher_padding;
|
||||
|
||||
/* Draw workspace indicator */
|
||||
if (show_workspace) {
|
||||
|
|
@ -342,7 +343,8 @@ render_osd(struct server *server, cairo_t *cairo, int w, int h,
|
|||
* Subtract 4x border-width to allow for both the OSD border and the
|
||||
* item border. This is the width of the area available for text fields.
|
||||
*/
|
||||
int available_width = w - 4 * theme->osd_border_width;
|
||||
int available_width = w - 4 * theme->osd_border_width
|
||||
- 2 * theme->osd_window_switcher_padding;
|
||||
|
||||
/* Draw text for each node */
|
||||
wl_list_for_each_reverse(node, node_list, link) {
|
||||
|
|
@ -374,7 +376,8 @@ render_osd(struct server *server, cairo_t *cairo, int w, int h,
|
|||
*/
|
||||
y += theme->osd_border_width;
|
||||
int x = theme->osd_window_switcher_item_padding_x
|
||||
+ 2 * theme->osd_border_width;
|
||||
+ 2 * theme->osd_border_width
|
||||
+ theme->osd_window_switcher_padding;
|
||||
|
||||
int nr_fields = wl_list_length(&rc.window_switcher.fields);
|
||||
struct window_switcher_field *field;
|
||||
|
|
@ -408,10 +411,11 @@ render_osd(struct server *server, cairo_t *cairo, int w, int h,
|
|||
if (view == cycle_view) {
|
||||
/* Highlight current window */
|
||||
struct wlr_fbox fbox = {
|
||||
.x = theme->osd_border_width,
|
||||
.x = theme->osd_border_width + theme->osd_window_switcher_padding,
|
||||
.y = y - theme->osd_border_width,
|
||||
.width = theme->osd_window_switcher_width
|
||||
- 2 * theme->osd_border_width,
|
||||
- 2 * theme->osd_border_width
|
||||
- 2 * theme->osd_window_switcher_padding,
|
||||
.height = theme->osd_window_switcher_item_height
|
||||
+ 2 * theme->osd_border_width,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue