Fix trivial coding style breaches

This commit is contained in:
Johan Malm 2022-04-04 20:53:36 +01:00
parent 8e1f115486
commit 5b34c81768
22 changed files with 151 additions and 91 deletions

View file

@ -63,20 +63,25 @@ ssd_border_update(struct view *view)
rect = lab_wlr_scene_get_rect(part->node);
switch (part->type) {
case LAB_SSD_PART_LEFT:
wlr_scene_rect_set_size(rect, theme->border_width, height);
wlr_scene_rect_set_size(rect,
theme->border_width, height);
continue;
case LAB_SSD_PART_RIGHT:
wlr_scene_rect_set_size(rect, theme->border_width, height);
wlr_scene_node_set_position(
part->node, theme->border_width + width, 0);
wlr_scene_rect_set_size(rect,
theme->border_width, height);
wlr_scene_node_set_position(part->node,
theme->border_width + width, 0);
continue;
case LAB_SSD_PART_BOTTOM:
wlr_scene_rect_set_size(rect, full_width, theme->border_width);
wlr_scene_node_set_position(part->node, 0, height);
wlr_scene_rect_set_size(rect,
full_width, theme->border_width);
wlr_scene_node_set_position(part->node,
0, height);
continue;
case LAB_SSD_PART_TOP:
wlr_scene_rect_set_size(rect,
width - 2 * BUTTON_WIDTH, theme->border_width);
width - 2 * BUTTON_WIDTH,
theme->border_width);
continue;
default:
continue;

View file

@ -183,7 +183,8 @@ ssd_extents_update(struct view *view)
if (part_box.width != result_box.width
|| part_box.height != result_box.height) {
/* Partly visible */
wlr_scene_rect_set_size(rect, result_box.width, result_box.height);
wlr_scene_rect_set_size(rect, result_box.width,
result_box.height);
wlr_scene_node_set_position(part->node,
target->x + (result_box.x - part_box.x),
target->y + (result_box.y - part_box.y));

View file

@ -83,7 +83,8 @@ ssd_titlebar_update(struct view *view)
wl_list_for_each(part, &subtree->parts, link) {
switch (part->type) {
case LAB_SSD_PART_TITLEBAR:
wlr_scene_rect_set_size(lab_wlr_scene_get_rect(part->node),
wlr_scene_rect_set_size(
lab_wlr_scene_get_rect(part->node),
width - BUTTON_WIDTH * BUTTON_COUNT,
theme->title_height);
continue;
@ -102,7 +103,8 @@ ssd_titlebar_update(struct view *view)
case LAB_SSD_BUTTON_CLOSE:
if (is_direct_child(part->node, subtree)) {
wlr_scene_node_set_position(part->node,
width - BUTTON_WIDTH * 1, -theme->border_width);
width - BUTTON_WIDTH * 1,
-theme->border_width);
}
continue;
default: