Changeset 15d0046 in mainline for uspace/lib/gui/window.c


Ignore:
Timestamp:
2014-09-12T13:22:33Z (10 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
9b20126
Parents:
8db09e4 (diff), 105d8d6 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes

File:
1 edited

Legend:

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

    r8db09e4 r15d0046  
    5555#include <drawctx.h>
    5656#include <surface.h>
     57#include <font/embedded.h>
    5758
    5859#include "common.h"
     
    160161        /* Window caption */
    161162       
    162         font_t font;
    163         font_init(&font, FONT_DECODER_EMBEDDED, NULL, 16);
    164        
    165         drawctx_set_font(&drawctx, &font);
     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);
    166171        source_set_color(&source, widget->window->is_focused ?
    167172            color_caption_focus : color_caption_unfocus);
     
    169174        sysarg_t cpt_width;
    170175        sysarg_t cpt_height;
    171         font_get_box(&font, widget->window->caption, &cpt_width, &cpt_height);
     176        font_get_box(font, widget->window->caption, &cpt_width, &cpt_height);
    172177       
    173178        bool draw_title =
     
    183188        }
    184189       
    185         font_release(&font);
     190        font_release(font);
    186191        window_yield(widget->window);
    187192}
Note: See TracChangeset for help on using the changeset viewer.