Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/gui/window.c

    r2cc1ec0 r61b5b73d  
    5555#include <drawctx.h>
    5656#include <surface.h>
    57 #include <font/embedded.h>
    5857
    5958#include "common.h"
     
    161160        /* Window caption */
    162161       
    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);
    171166        source_set_color(&source, widget->window->is_focused ?
    172167            color_caption_focus : color_caption_unfocus);
     
    174169        sysarg_t cpt_width;
    175170        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);
    177172       
    178173        bool draw_title =
     
    188183        }
    189184       
    190         font_release(font);
     185        font_release(&font);
    191186        window_yield(widget->window);
    192187}
Note: See TracChangeset for help on using the changeset viewer.