summaryrefslogtreecommitdiff
path: root/sway/tree/view.c
diff options
context:
space:
mode:
authorRyan Dwyer <[email protected]>2018-05-22 08:27:42 +1000
committerRyan Dwyer <[email protected]>2018-05-22 08:27:42 +1000
commitf6c3682c05bce05f00b13b8f469b52923ecd8ddb (patch)
tree57a109a0bef2b14ecd24a39469d52c70f6933987 /sway/tree/view.c
parent664169fbf1c4e07f17a48b2b801dad9cea31ea4c (diff)
Use constants for titlebar dimensions
Diffstat (limited to 'sway/tree/view.c')
-rw-r--r--sway/tree/view.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sway/tree/view.c b/sway/tree/view.c
index 1280dc8d..07157818 100644
--- a/sway/tree/view.c
+++ b/sway/tree/view.c
@@ -182,10 +182,10 @@ void view_autoconfigure(struct sway_view *view) {
// area. We have to offset the surface y by the height of the title bar, and
// disable any top border because we'll always have the title bar.
if (view->swayc->parent->layout == L_TABBED) {
- y_offset = config->font_height + 8;
+ y_offset = container_titlebar_height();
view->border_top = 0;
} else if (view->swayc->parent->layout == L_STACKED) {
- y_offset = (config->font_height + 8)
+ y_offset = container_titlebar_height()
* view->swayc->parent->children->length;
view->border_top = 0;
}
@@ -218,8 +218,8 @@ void view_autoconfigure(struct sway_view *view) {
height = view->swayc->height - y_offset
- view->border_thickness * view->border_bottom;
} else {
- y = view->swayc->y + config->font_height + 8;
- height = view->swayc->height - config->font_height - 8
+ y = view->swayc->y + container_titlebar_height();
+ height = view->swayc->height - container_titlebar_height()
- view->border_thickness * view->border_bottom;
}
break;