mirror of
https://git.checksum.fail/alec/erythros
synced 2025-12-08 03:59:54 +02:00
Media/Themes/Umami: Clip text ctx to widget size in @umami_tab_panel_repaint_tab
This commit is contained in:
@@ -1544,6 +1544,8 @@ U0 @umami_tab_panel_repaint_tab(Window* win, TabPanelWidget* widget, I64* src_x,
|
||||
tab_rect_width = widget->size;
|
||||
}
|
||||
|
||||
Context2D* tab_text_ctx = NewContext2D(tab_rect_width - T(tab->icon, 20, 0) - 16, 16);
|
||||
|
||||
tab->x = x;
|
||||
tab->y = y;
|
||||
tab->width = tab_rect_width;
|
||||
@@ -1567,7 +1569,9 @@ U0 @umami_tab_panel_repaint_tab(Window* win, TabPanelWidget* widget, I64* src_x,
|
||||
if (tab->icon) {
|
||||
Blot2D(win->render_ctx, x + 7, y + y1 + 6, tab->icon);
|
||||
}
|
||||
Print2D(win->render_ctx, Compositor.theme.font.menu, x + 7 + T(tab->icon, 20, 0), y + y1 + 10, T(active, Color(0, 0, 0), Color(152, 152, 152)), , &tab->text);
|
||||
Print2D(tab_text_ctx, Compositor.theme.font.menu, 0, 0, T(active, Color(0, 0, 0), Color(152, 152, 152)), , &tab->text);
|
||||
win->render_ctx->blot(x + 7 + T(tab->icon, 20, 0), y + y1 + 10, tab_text_ctx);
|
||||
DelContext2D(tab_text_ctx);
|
||||
|
||||
x += tab_rect_width;
|
||||
*src_x = x;
|
||||
|
||||
Reference in New Issue
Block a user