diff options
author | 2016-08-11 23:30:58 +0200 | |
---|---|---|
committer | 2016-08-11 23:57:38 +0200 | |
commit | fc492a4da8e252ccb7969cfda60cf784cd511d9d (patch) | |
tree | 71fe95c7abea0412f73df3e4842b0a42c2097199 /sway | |
parent | Merge pull request #851 from thejan2009/output-disable-during-runtime (diff) | |
download | sway-fc492a4da8e252ccb7969cfda60cf784cd511d9d.tar.gz sway-fc492a4da8e252ccb7969cfda60cf784cd511d9d.tar.zst sway-fc492a4da8e252ccb7969cfda60cf784cd511d9d.zip |
Add support for indicator color
Diffstat (limited to 'sway')
-rw-r--r-- | sway/border.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/sway/border.c b/sway/border.c index 0d3cfab8..5cb02274 100644 --- a/sway/border.c +++ b/sway/border.c | |||
@@ -102,6 +102,8 @@ static void render_borders(swayc_t *view, cairo_t *cr, struct border_colors *col | |||
102 | struct wlc_geometry *g = &view->border->geometry; | 102 | struct wlc_geometry *g = &view->border->geometry; |
103 | struct wlc_geometry *b = &view->border_geometry; | 103 | struct wlc_geometry *b = &view->border_geometry; |
104 | struct wlc_geometry *v = &view->actual_geometry; | 104 | struct wlc_geometry *v = &view->actual_geometry; |
105 | enum swayc_layouts layout = view->parent->layout; | ||
106 | uint32_t color; | ||
105 | 107 | ||
106 | int x = b->origin.x - g->origin.x; | 108 | int x = b->origin.x - g->origin.x; |
107 | int y = b->origin.y - g->origin.y; | 109 | int y = b->origin.y - g->origin.y; |
@@ -119,8 +121,13 @@ static void render_borders(swayc_t *view, cairo_t *cr, struct border_colors *col | |||
119 | // right border | 121 | // right border |
120 | int right_border = b->size.w - v->size.w - left_border; | 122 | int right_border = b->size.w - v->size.w - left_border; |
121 | if (right_border > 0) { | 123 | if (right_border > 0) { |
124 | if (layout == L_HORIZ) { | ||
125 | color = colors->indicator; | ||
126 | } else { | ||
127 | color = colors->child_border; | ||
128 | } | ||
122 | render_sharp_line(cr, | 129 | render_sharp_line(cr, |
123 | colors->child_border, | 130 | color, |
124 | x + b->size.w - right_border, | 131 | x + b->size.w - right_border, |
125 | y, | 132 | y, |
126 | right_border, | 133 | right_border, |
@@ -140,8 +147,13 @@ static void render_borders(swayc_t *view, cairo_t *cr, struct border_colors *col | |||
140 | // bottom border | 147 | // bottom border |
141 | int bottom_border = b->size.h - (top_border + v->size.h); | 148 | int bottom_border = b->size.h - (top_border + v->size.h); |
142 | if (bottom_border > 0) { | 149 | if (bottom_border > 0) { |
150 | if (layout == L_VERT) { | ||
151 | color = colors->indicator; | ||
152 | } else { | ||
153 | color = colors->child_border; | ||
154 | } | ||
143 | render_sharp_line(cr, | 155 | render_sharp_line(cr, |
144 | colors->child_border, | 156 | color, |
145 | x, | 157 | x, |
146 | y + b->size.h - bottom_border, | 158 | y + b->size.h - bottom_border, |
147 | b->size.w, | 159 | b->size.w, |