Changeset 3fd38b2 in mainline for uspace/app/taskbar/clock.c


Ignore:
Timestamp:
2022-09-29T07:45:07Z (19 months ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c77cfd8
Parents:
50a16d9
git-author:
Jiri Svoboda <jiri@…> (2022-09-28 07:44:28)
git-committer:
Jiri Svoboda <jiri@…> (2022-09-29 07:45:07)
Message:

Size taskbar based on display size, fix text mode

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/taskbar/clock.c

    r50a16d9 r3fd38b2  
    4444#include <ui/paint.h>
    4545#include <ui/resource.h>
     46#include <ui/ui.h>
    4647#include "clock.h"
    4748
     
    135136        gfx_context_t *gc = ui_window_get_gc(clock->window);
    136137        ui_resource_t *res = ui_window_get_res(clock->window);
     138        ui_t *ui = ui_window_get_ui(clock->window);
    137139        char buf[10];
    138140        gfx_text_fmt_t fmt;
     
    141143        errno_t rc;
    142144
     145        if (!ui_is_textmode(ui)) {
     146                /* Paint frame */
     147                rc = ui_paint_inset_frame(res, &clock->rect, &irect);
     148                if (rc != EOK)
     149                        goto error;
     150        } else {
     151                irect = clock->rect;
     152        }
     153
     154        rc = gfx_set_color(gc, ui_resource_get_wnd_face_color(res));
     155        if (rc != EOK)
     156                goto error;
     157
    143158        /* Fill background */
    144 
    145         rc = ui_paint_inset_frame(res, &clock->rect, &irect);
    146         if (rc != EOK)
    147                 goto error;
    148 
    149         rc = gfx_set_color(gc, ui_resource_get_wnd_face_color(res));
    150         if (rc != EOK)
    151                 goto error;
    152 
    153159        rc = gfx_fill_rect(gc, &irect);
    154160        if (rc != EOK)
Note: See TracChangeset for help on using the changeset viewer.