/**************************************************************************** Creates the UI. ****************************************************************************/ void help_widget::setup_ui() { QVBoxLayout *layout; QHBoxLayout *group_layout; layout = new QVBoxLayout(); setLayout(layout); box_wdg = new QFrame(this); layout->addWidget(box_wdg); group_layout = new QHBoxLayout(box_wdg); box_wdg->setLayout(group_layout); box_wdg->setFrameShape(QFrame::StyledPanel); box_wdg->setFrameShadow(QFrame::Raised); title_label = new QLabel(box_wdg); group_layout->addWidget(title_label); text_browser = new QTextBrowser(this); text_browser->setFont(QFont(QLatin1String("mono"))); layout->addWidget(text_browser); main_widget = text_browser; splitter_sizes << 200 << 400; update_fonts(); }
static void set_font_cb (MarinaMessageBus *message_bus, MarinaMessage *message, MarinaWebView *web_view) { MarinaWebViewPrivate *priv; WebKitWebSettings *settings; g_return_if_fail (MARINA_IS_WEB_VIEW (web_view)); priv = web_view->priv; settings = webkit_web_view_get_settings (WEBKIT_WEB_VIEW (priv->web_view)); update_fonts (web_view, settings); }
void um_editable_button_set_scale (UmEditableButton *button, gdouble scale) { UmEditableButtonPrivate *priv = button->priv; if (priv->scale == scale && priv->scale_set) return; priv->scale = scale; priv->scale_set = TRUE; update_fonts (button); g_object_notify (G_OBJECT (button), "scale"); g_object_notify (G_OBJECT (button), "scale-set"); }
void um_editable_button_set_weight (UmEditableButton *button, gint weight) { UmEditableButtonPrivate *priv = button->priv; if (priv->weight == weight && priv->weight_set) return; priv->weight = weight; priv->weight_set = TRUE; update_fonts (button); g_object_notify (G_OBJECT (button), "weight"); g_object_notify (G_OBJECT (button), "weight-set"); }
static void load_finished_cb (MarinaWebView *web_view) { MarinaWebViewPrivate *priv; WebKitWebSettings *settings; g_return_if_fail (MARINA_IS_WEB_VIEW (web_view)); priv = web_view->priv; priv->loaded = TRUE; settings = webkit_web_view_get_settings (WEBKIT_WEB_VIEW (web_view->priv->web_view)); update_fonts (web_view, settings); marina_web_view_set_source (web_view, priv->source); if (priv->item) marina_web_view_set_item (web_view, priv->item); }
void ClockArea_init(Window* window) { // record the screen size, since we NEVER GET IT AGAIN screen_rect = layer_get_bounds(window_get_root_layer(window)); GRect bounds; bounds = GRect(0, 0, screen_rect.size.w, screen_rect.size.h); // init the clock area layer clock_area_layer = layer_create(bounds); layer_add_child(window_get_root_layer(window), clock_area_layer); layer_set_update_proc(clock_area_layer, update_clock_area_layer); // allocate fonts avenir = ffont_create_from_resource(RESOURCE_ID_AVENIR_REGULAR_FFONT); avenir_bold = ffont_create_from_resource(RESOURCE_ID_AVENIR_BOLD_FFONT); leco = ffont_create_from_resource(RESOURCE_ID_LECO_REGULAR_FFONT); // select fonts based on settings update_fonts(); }
void ClockArea_redraw() { // check if the fonts need to be switched update_fonts(); layer_mark_dirty(clock_area_layer); }