--- /dev/null
+.notebook tab .button {
+ -GtkButton-default-border: 0;
+ -GtkButton-default-outside-border: 0;
+ -GtkButton-inner-border: 0;
+ -GtkWidget-focus-line-width: 0;
+ -GtkWidget-focus-padding: 0;
+ padding: 0;
+}
+
+.entry.progressbar {
+ background-image: -gtk-gradient(linear,
+ left top, left bottom, from (@selected_bg_color), to (@selected_bg_color));
+ color: @selected_fg_color;
+}
+
+.entry.security_unknown {
+ background-image: -gtk-gradient(linear,
+ left top, left bottom, from (#ef7070), to(#ef7070));
+ color: #000;
+}
+
+.entry.security_trusted {
+ background-image: -gtk-gradient(linear,
+ left top, left bottom, from (#d1eeb9), to(#d1eeb9));
+ color: #000;
+}
+
+GtkOverlay > * {
+ padding: 4px;
+ border-style: solid;
+ border-radius: 0 5px 0 0;
+ border-width: 1px 1px 0 0;
+}
+
+GtkOverlay MidoriFindbar {
+ border-radius: 0 0 0 5px;
+ border-width: 0 0 1px 1px; /* top right bottom left */
+}
+
katze_array_add_item (app->browsers, browser);
+ #if GTK_CHECK_VERSION (3, 0, 0)
+ if (app->browser == NULL)
+ {
+ gchar* filename;
+ if ((filename = midori_app_find_res_filename ("gtk3.css")))
+ {
+ GtkCssProvider* css_provider = gtk_css_provider_new ();
+ GError* error = NULL;
+ gtk_css_provider_load_from_path (css_provider, filename, &error);
+ if (error == NULL)
+ {
+ gtk_style_context_add_provider_for_screen (
+ gtk_widget_get_screen (GTK_WIDGET (browser)),
+ GTK_STYLE_PROVIDER (css_provider),
+ GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
+ }
+ else
+ {
+ g_warning ("Failed to load \"%s\": %s", filename, error->message);
+ g_error_free (error);
+ }
+ g_free (filename);
+ }
+ }
+ #endif
+
app->browser = browser;
#if HAVE_UNIQUE
/* We *do not* let unique watch windows because that includes
gtk_widget_show (entry);
gtk_container_add (GTK_CONTAINER (alignment), entry);
- #if GTK_CHECK_VERSION (3, 0, 0)
- {
- static const gchar default_style[] =
- ".security_unknown {\n"
- "background-image: none;\n"
- "background-color: #ef7070;\n"
- "color: #000;\n"
- "}\n"
- ".security_trusted {\n"
- "background-image: none;\n"
- "background-color: #d1eeb9;\n"
- "color: #000;\n"
- "}\n";
- GtkCssProvider* css_provider;
- GtkStyleContext* context;
-
- css_provider = gtk_css_provider_new ();
- context = gtk_widget_get_style_context (entry);
- gtk_css_provider_load_from_data (css_provider, default_style, -1, NULL);
- gtk_style_context_add_provider (context, GTK_STYLE_PROVIDER (css_provider),
- GTK_STYLE_PROVIDER_PRIORITY_FALLBACK);
- }
- #endif
-
return toolitem;
}
gtk_box_pack_start (GTK_BOX (view), view->overlay, TRUE, TRUE, 0);
/* Overlays must be created before showing GtkOverlay as of GTK+ 3.2 */
+ {
+ GtkWidget* frame = gtk_frame_new (NULL);
view->overlay_label = gtk_label_new (NULL);
- gtk_widget_set_halign (view->overlay_label, GTK_ALIGN_START);
- gtk_widget_set_valign (view->overlay_label, GTK_ALIGN_END);
- gtk_overlay_add_overlay (GTK_OVERLAY (view->overlay), view->overlay_label);
+ gtk_container_add (GTK_CONTAINER (frame), view->overlay_label);
+ gtk_widget_set_halign (frame, GTK_ALIGN_START);
+ gtk_widget_set_valign (frame, GTK_ALIGN_END);
+ gtk_overlay_add_overlay (GTK_OVERLAY (view->overlay), frame);
+ }
view->overlay_find = g_object_new (MIDORI_TYPE_FINDBAR, NULL);
gtk_widget_set_halign (view->overlay_find, GTK_ALIGN_END);
gtk_widget_set_valign (view->overlay_find, GTK_ALIGN_START);
#if GTK_CHECK_VERSION (3, 2, 0)
if (text == NULL)
- gtk_widget_hide (view->overlay_label);
+ gtk_widget_hide (gtk_widget_get_parent (view->overlay_label));
else
{
gtk_label_set_text (GTK_LABEL (view->overlay_label), text);
- gtk_widget_show (view->overlay_label);
+ gtk_widget_show (gtk_widget_get_parent (view->overlay_label));
}
#endif
}
{
GtkWidget* event_box;
GtkWidget* hbox;
+ #if !GTK_CHECK_VERSION (3, 0, 0)
static const gchar style_fixup[] =
- #if GTK_CHECK_VERSION (3, 0, 0)
- "* {\n"
- "-GtkButton-default-border : 0;\n"
- "-GtkButton-default-outside-border : 0;\n"
- "-GtkButton-inner-border: 0;\n"
- "-GtkWidget-focus-line-width : 0;\n"
- "-GtkWidget-focus-padding : 0;\n"
- "padding: 0;\n"
- "}";
- GtkStyleContext* context;
- GtkCssProvider* css_provider;
- #else
"style \"midori-close-button-style\"\n"
"{\n"
"GtkWidget::focus-padding = 0\n"
view->tab_close = gtk_button_new ();
gtk_button_set_relief (GTK_BUTTON (view->tab_close), GTK_RELIEF_NONE);
gtk_button_set_focus_on_click (GTK_BUTTON (view->tab_close), FALSE);
- #if GTK_CHECK_VERSION (3, 0, 0)
- context = gtk_widget_get_style_context (view->tab_close);
- css_provider = gtk_css_provider_new ();
- gtk_css_provider_load_from_data (css_provider, style_fixup, -1, NULL);
- gtk_style_context_add_provider (context, GTK_STYLE_PROVIDER (css_provider),
- GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
- #else
+ #if !GTK_CHECK_VERSION (3, 0, 0)
gtk_rc_parse_string (style_fixup);
gtk_widget_set_name (view->tab_close, "midori-close-button");
g_signal_connect (view->tab_close, "style-set",
else:
Utils.pprint ('BLUE', "logo-shade could not be rasterized.")
- for res_file in ['about.css', 'error.html', 'close.png', 'speeddial-head.html']:
+ for res_file in ['about.css', 'error.html', 'close.png', 'gtk3.css', 'speeddial-head.html']:
bld.install_files ('${MDATADIR}/' + APPNAME + '/res', 'data/' + res_file)
if bld.env['addons']: