]> spindle.queued.net Git - midori/commitdiff
Use classes in widget demo including file controls
authorChristian Dywan <christian@twotoasts.de>
Sat, 17 Dec 2011 21:50:57 +0000 (22:50 +0100)
committerChristian Dywan <christian@twotoasts.de>
Sat, 17 Dec 2011 21:50:57 +0000 (22:50 +0100)
midori/midori-view.c

index 513ea3d87b69c3be577fd561e867c5d623b8ea83..b82939c0d76dc6823a72bd74befe66d01300f336 100644 (file)
@@ -3914,22 +3914,22 @@ midori_view_set_uri (MidoriView*  view,
                     "<input type=\"submit\"%s>",
                 };
                 guint i;
-                GString* demo = g_string_new ("<html><head><title>");
+                GString* demo = g_string_new ("<html><head><style>"
+                    ".fallback, .fallback::-webkit-file-upload-button { "
+                    "-webkit-appearance: none !important }"
+                    ".column { display:inline-block; vertical-align:top;"
+                    "width:25%;margin-right:1% }</style><title>");
                 g_string_append_printf (demo,
                     "%s</title></head><body><h1>%s</h1>", uri, uri);
-                g_string_append (demo, "<div style=\"display:inline-block;"
-                    "vertical-align:top;width:25%;margin-right:1%\"");
+                g_string_append (demo, "<div class=\"column\"");
                 for (i = 0; i < G_N_ELEMENTS (widgets); i++)
                     g_string_append_printf (demo, widgets[i], "");
-                g_string_append (demo, "</div><div style=\"display:inline-block;"
-                    "vertical-align:top;width:25%;margin-right:1%\"");
+                g_string_append (demo, "</div><div class=\"column\"");
                 for (i = 0; i < G_N_ELEMENTS (widgets); i++)
                     g_string_append_printf (demo, widgets[i], " disabled");
-                g_string_append (demo, "</div><div style=\"display:inline-block;"
-                    "vertical-align:top;width:25%;margin-right:1%\"");
+                g_string_append (demo, "</div><div class=\"column\"");
                 for (i = 0; i < G_N_ELEMENTS (widgets); i++)
-                    g_string_append_printf (demo, widgets[i],
-                       " style=\"-webkit-appearance:none !important\"");
+                    g_string_append_printf (demo, widgets[i], " class=\"fallback\"");
                 g_string_append (demo, "</div>");
                 katze_assign (view->uri, g_strdup (uri));
                 data = g_string_free (demo, FALSE);