diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-12-04 09:04:49 +0200 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-12-04 09:04:49 +0200 |
commit | c8089179f84a2cabd84a47a800aaadd9af8bd9b8 (patch) | |
tree | 5270a456534b801f1f5fb0c600f9cd34fbbd7a28 /src/ui/widget.c | |
parent | 9fde33bb6f8149cc8dee7ac626b8b56f9f1cd14e (diff) |
Added a second sidebar; removed hover outline
A sidebar on the right is a better solution than a kludgy non-interactive special-purpose outline that appears when hoving the mouse on the document scrollbar.
Diffstat (limited to 'src/ui/widget.c')
-rw-r--r-- | src/ui/widget.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/ui/widget.c b/src/ui/widget.c index 4d50da38..f3e73ee7 100644 --- a/src/ui/widget.c +++ b/src/ui/widget.c | |||
@@ -263,10 +263,13 @@ void arrange_Widget(iWidget *d) { | |||
263 | setFlags_Widget(d, wasCollapsed_WidgetFlag, iTrue); | 263 | setFlags_Widget(d, wasCollapsed_WidgetFlag, iTrue); |
264 | return; | 264 | return; |
265 | } | 265 | } |
266 | if (d->flags & moveToParentRightEdge_WidgetFlag) { | 266 | if (d->flags & moveToParentLeftEdge_WidgetFlag) { |
267 | d->rect.pos.x = d->padding[0]; | ||
268 | } | ||
269 | else if (d->flags & moveToParentRightEdge_WidgetFlag) { | ||
267 | d->rect.pos.x = width_Rect(innerRect_Widget_(d->parent)) - width_Rect(d->rect); | 270 | d->rect.pos.x = width_Rect(innerRect_Widget_(d->parent)) - width_Rect(d->rect); |
268 | } | 271 | } |
269 | if (d->flags & centerHorizontal_WidgetFlag) { | 272 | else if (d->flags & centerHorizontal_WidgetFlag) { |
270 | centerHorizontal_Widget_(d); | 273 | centerHorizontal_Widget_(d); |
271 | } | 274 | } |
272 | if (d->flags & resizeToParentWidth_WidgetFlag) { | 275 | if (d->flags & resizeToParentWidth_WidgetFlag) { |
@@ -388,7 +391,8 @@ void arrange_Widget(iWidget *d) { | |||
388 | continue; | 391 | continue; |
389 | } | 392 | } |
390 | if (d->flags & (arrangeHorizontal_WidgetFlag | arrangeVertical_WidgetFlag)) { | 393 | if (d->flags & (arrangeHorizontal_WidgetFlag | arrangeVertical_WidgetFlag)) { |
391 | if (child->flags & moveToParentRightEdge_WidgetFlag) { | 394 | if (child->flags & |
395 | (moveToParentLeftEdge_WidgetFlag | moveToParentRightEdge_WidgetFlag)) { | ||
392 | continue; /* Not part of the sequential arrangement .*/ | 396 | continue; /* Not part of the sequential arrangement .*/ |
393 | } | 397 | } |
394 | child->rect.pos = pos; | 398 | child->rect.pos = pos; |
@@ -422,7 +426,8 @@ void arrange_Widget(iWidget *d) { | |||
422 | iForEach(ObjectList, j, d->children) { | 426 | iForEach(ObjectList, j, d->children) { |
423 | iWidget *child = as_Widget(j.object); | 427 | iWidget *child = as_Widget(j.object); |
424 | if (child->flags & | 428 | if (child->flags & |
425 | (resizeToParentWidth_WidgetFlag | moveToParentRightEdge_WidgetFlag)) { | 429 | (resizeToParentWidth_WidgetFlag | moveToParentLeftEdge_WidgetFlag | |
430 | moveToParentRightEdge_WidgetFlag)) { | ||
426 | arrange_Widget(child); | 431 | arrange_Widget(child); |
427 | } | 432 | } |
428 | } | 433 | } |