Changes in uspace/lib/gui/window.c [2cc1ec0:61b5b73d] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/gui/window.c
r2cc1ec0 r61b5b73d 55 55 #include <drawctx.h> 56 56 #include <surface.h> 57 #include <font/embedded.h>58 57 59 58 #include "common.h" … … 161 160 /* Window caption */ 162 161 163 font_t *font; 164 int rc = embedded_font_create(&font, 16); 165 if (rc != EOK) { 166 window_yield(widget->window); 167 return; 168 } 169 170 drawctx_set_font(&drawctx, font); 162 font_t font; 163 font_init(&font, FONT_DECODER_EMBEDDED, NULL, 16); 164 165 drawctx_set_font(&drawctx, &font); 171 166 source_set_color(&source, widget->window->is_focused ? 172 167 color_caption_focus : color_caption_unfocus); … … 174 169 sysarg_t cpt_width; 175 170 sysarg_t cpt_height; 176 font_get_box( font, widget->window->caption, &cpt_width, &cpt_height);171 font_get_box(&font, widget->window->caption, &cpt_width, &cpt_height); 177 172 178 173 bool draw_title = … … 188 183 } 189 184 190 font_release( font);185 font_release(&font); 191 186 window_yield(widget->window); 192 187 }
Note:
See TracChangeset
for help on using the changeset viewer.