diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-03-06 10:52:37 +0200 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-03-06 10:52:37 +0200 |
commit | 7fa64b95d0c63b243f50b23c5551a7e04fe90c30 (patch) | |
tree | c77ce6a28fc48e9409bfd7afd674604bfb82d006 /src/ui/widget.c | |
parent | 24afe73aae2cedfb43345f014c601539161dded6 (diff) |
Mobile: Dialog styling for phones
Diffstat (limited to 'src/ui/widget.c')
-rw-r--r-- | src/ui/widget.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/ui/widget.c b/src/ui/widget.c index bb5431eb..c54ea444 100644 --- a/src/ui/widget.c +++ b/src/ui/widget.c | |||
@@ -680,12 +680,6 @@ void drawBackground_Widget(const iWidget *d) { | |||
680 | if (d->flags & (hidden_WidgetFlag | noBackground_WidgetFlag)) { | 680 | if (d->flags & (hidden_WidgetFlag | noBackground_WidgetFlag)) { |
681 | return; | 681 | return; |
682 | } | 682 | } |
683 | if (d->flags & borderTop_WidgetFlag) { | ||
684 | const iRect rect = bounds_Widget(d); | ||
685 | iPaint p; | ||
686 | init_Paint(&p); | ||
687 | drawHLine_Paint(&p, topLeft_Rect(rect), width_Rect(rect), uiBackgroundFramelessHover_ColorId); | ||
688 | } | ||
689 | /* Popup menus have a shadowed border. */ | 683 | /* Popup menus have a shadowed border. */ |
690 | const iBool shadowBorder = | 684 | const iBool shadowBorder = |
691 | (d->flags & keepOnTop_WidgetFlag && ~d->flags & mouseModal_WidgetFlag) != 0; | 685 | (d->flags & keepOnTop_WidgetFlag && ~d->flags & mouseModal_WidgetFlag) != 0; |
@@ -757,6 +751,19 @@ void drawBackground_Widget(const iWidget *d) { | |||
757 | drawRectThickness_Paint(&p, rect, gap_UI / 4, d->frameColor); | 751 | drawRectThickness_Paint(&p, rect, gap_UI / 4, d->frameColor); |
758 | } | 752 | } |
759 | } | 753 | } |
754 | if (d->flags & (borderTop_WidgetFlag | borderBottom_WidgetFlag)) { | ||
755 | const iRect rect = bounds_Widget(d); | ||
756 | iPaint p; | ||
757 | init_Paint(&p); | ||
758 | if (d->flags & borderTop_WidgetFlag) { | ||
759 | drawHLine_Paint(&p, topLeft_Rect(rect), width_Rect(rect), | ||
760 | uiBackgroundFramelessHover_ColorId); | ||
761 | } | ||
762 | if (d->flags & borderBottom_WidgetFlag) { | ||
763 | drawHLine_Paint(&p, addY_I2(bottomLeft_Rect(rect), -1), width_Rect(rect), | ||
764 | uiBackgroundFramelessHover_ColorId); | ||
765 | } | ||
766 | } | ||
760 | } | 767 | } |
761 | 768 | ||
762 | iLocalDef iBool isDrawn_Widget_(const iWidget *d) { | 769 | iLocalDef iBool isDrawn_Widget_(const iWidget *d) { |