[epiphany] prefs-general-page: Move CSS data to _shared-base.scss
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] prefs-general-page: Move CSS data to _shared-base.scss
- Date: Wed, 26 Aug 2020 14:50:19 +0000 (UTC)
commit dade2d0b4636e187316234cae6fb824148446772
Author: Yetizone <andreii lisita gmail com>
Date: Tue Aug 11 17:20:07 2020 +0300
prefs-general-page: Move CSS data to _shared-base.scss
Also regenerate CSS
Fixes https://gitlab.gnome.org/GNOME/epiphany/-/issues/1281
src/preferences/prefs-general-page.c | 32 +---------------------------
src/resources/themes/Adwaita-dark.css | 12 +++++++++++
src/resources/themes/Adwaita.css | 12 +++++++++++
src/resources/themes/HighContrast.css | 12 +++++++++++
src/resources/themes/HighContrastInverse.css | 12 +++++++++++
src/resources/themes/_shared-base.scss | 32 ++++++++++++++++++++++++++++
src/resources/themes/elementary.css | 12 +++++++++++
src/resources/themes/shared.css | 12 +++++++++++
8 files changed, 105 insertions(+), 31 deletions(-)
---
diff --git a/src/preferences/prefs-general-page.c b/src/preferences/prefs-general-page.c
index df2b3f8b0..7c42eb129 100644
--- a/src/preferences/prefs-general-page.c
+++ b/src/preferences/prefs-general-page.c
@@ -484,7 +484,7 @@ language_editor_add (PrefsGeneralPage *general_page,
row = hdy_action_row_new ();
hdy_preferences_row_set_title (HDY_PREFERENCES_ROW (row), desc);
g_object_set_data (G_OBJECT (row), "code", g_strdup (code));
- gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET (row)), "row");
+ gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET (row)), "draggable");
event_box = gtk_event_box_new ();
gtk_drag_source_set (GTK_WIDGET (event_box), GDK_BUTTON1_MASK, entries, 1, GDK_ACTION_MOVE);
@@ -1169,41 +1169,11 @@ prefs_general_page_class_init (PrefsGeneralPageClass *klass)
gtk_widget_class_bind_template_callback (widget_class, on_search_engine_dialog_button_clicked);
}
-static const char *css =
- ".row.drag-icon { "
- " background: white; "
- " border: 1px solid black; "
- "}"
- ".row.drag-row { "
- " color: gray; "
- " background: alpha(gray,0.2); "
- "}"
- ".row.drag-row.drag-hover { "
- " border-top: 1px solid #4e9a06; "
- " border-bottom: 1px solid #4e9a06; "
- "}"
- ".row.drag-hover image, "
- ".row.drag-hover label { "
- " color: #4e9a06; "
- "}"
- ".row.drag-hover-top {"
- " border-top: 1px solid #4e9a06; "
- "}"
- ".row.drag-hover-bottom {"
- " border-bottom: 1px solid #4e9a06; "
- "}"
-;
-
static void
init_lang_listbox (PrefsGeneralPage *general_page)
{
char **list = NULL;
int i;
- GtkCssProvider *provider;
-
- provider = gtk_css_provider_new ();
- gtk_css_provider_load_from_data (provider, css, -1, NULL);
- gtk_style_context_add_provider_for_screen (gdk_screen_get_default (), GTK_STYLE_PROVIDER (provider), 800);
gtk_drag_dest_set (general_page->lang_listbox, GTK_DEST_DEFAULT_MOTION | GTK_DEST_DEFAULT_DROP, entries,
1, GDK_ACTION_MOVE);
g_signal_connect (general_page->lang_listbox, "drag-data-received", G_CALLBACK (drag_data_received),
general_page);
diff --git a/src/resources/themes/Adwaita-dark.css b/src/resources/themes/Adwaita-dark.css
index 69d2a5e54..80e2adf7a 100644
--- a/src/resources/themes/Adwaita-dark.css
+++ b/src/resources/themes/Adwaita-dark.css
@@ -78,6 +78,18 @@ dzlsuggestionpopover > revealer > box > elastic > scrolledwindow > viewport > li
.transparent { background: none; }
+.draggable.drag-icon { background: white; border: 1px solid black; }
+
+.draggable.drag-row { color: gray; background: alpha(gray,0.2); }
+
+.draggable.drag-row.drag-hover { border-top: 1px solid #4e9a06; border-bottom: 1px solid #4e9a06; }
+
+.draggable.drag-hover image, .draggable.drag-hover label { color: #4e9a06; }
+
+.draggable.drag-hover-top { border-top: 1px solid #4e9a06; }
+
+.draggable.drag-hover-bottom { border-bottom: 1px solid #4e9a06; }
+
.incognito-mode { /*************************** Check and Radio buttons * */ }
.incognito-mode headerbar { background: #141927 linear-gradient(to top, #1a2235, #1e263b); box-shadow: inset
0 1px rgba(231, 234, 243, 0.07); border-color: #06080c; }
diff --git a/src/resources/themes/Adwaita.css b/src/resources/themes/Adwaita.css
index 413ea6d7f..b29415315 100644
--- a/src/resources/themes/Adwaita.css
+++ b/src/resources/themes/Adwaita.css
@@ -78,6 +78,18 @@ dzlsuggestionpopover > revealer > box > elastic > scrolledwindow > viewport > li
.transparent { background: none; }
+.draggable.drag-icon { background: white; border: 1px solid black; }
+
+.draggable.drag-row { color: gray; background: alpha(gray,0.2); }
+
+.draggable.drag-row.drag-hover { border-top: 1px solid #4e9a06; border-bottom: 1px solid #4e9a06; }
+
+.draggable.drag-hover image, .draggable.drag-hover label { color: #4e9a06; }
+
+.draggable.drag-hover-top { border-top: 1px solid #4e9a06; }
+
+.draggable.drag-hover-bottom { border-bottom: 1px solid #4e9a06; }
+
.incognito-mode { /*************************** Check and Radio buttons * */ }
.incognito-mode headerbar { background: #c4d6e9 linear-gradient(to top, #bdd1e6, #c8d9ea); box-shadow: inset
0 1px rgba(255, 255, 255, 0.8); border-color: #91b2d6; }
diff --git a/src/resources/themes/HighContrast.css b/src/resources/themes/HighContrast.css
index 605f6fdce..87d952a93 100644
--- a/src/resources/themes/HighContrast.css
+++ b/src/resources/themes/HighContrast.css
@@ -78,6 +78,18 @@ dzlsuggestionpopover > revealer > box > elastic > scrolledwindow > viewport > li
.transparent { background: none; }
+.draggable.drag-icon { background: white; border: 1px solid black; }
+
+.draggable.drag-row { color: gray; background: alpha(gray,0.2); }
+
+.draggable.drag-row.drag-hover { border-top: 1px solid #4e9a06; border-bottom: 1px solid #4e9a06; }
+
+.draggable.drag-hover image, .draggable.drag-hover label { color: #4e9a06; }
+
+.draggable.drag-hover-top { border-top: 1px solid #4e9a06; }
+
+.draggable.drag-hover-bottom { border-bottom: 1px solid #4e9a06; }
+
.incognito-mode { /*************************** Check and Radio buttons * */ }
.incognito-mode headerbar { background: #d0deed linear-gradient(to top, #c8d9ea, #d3e0ef); box-shadow: inset
0 1px rgba(255, 255, 255, 0.8); border-color: #345d8a; }
diff --git a/src/resources/themes/HighContrastInverse.css b/src/resources/themes/HighContrastInverse.css
index b7926adac..32f872de9 100644
--- a/src/resources/themes/HighContrastInverse.css
+++ b/src/resources/themes/HighContrastInverse.css
@@ -78,6 +78,18 @@ dzlsuggestionpopover > revealer > box > elastic > scrolledwindow > viewport > li
.transparent { background: none; }
+.draggable.drag-icon { background: white; border: 1px solid black; }
+
+.draggable.drag-row { color: gray; background: alpha(gray,0.2); }
+
+.draggable.drag-row.drag-hover { border-top: 1px solid #4e9a06; border-bottom: 1px solid #4e9a06; }
+
+.draggable.drag-hover image, .draggable.drag-hover label { color: #4e9a06; }
+
+.draggable.drag-hover-top { border-top: 1px solid #4e9a06; }
+
+.draggable.drag-hover-bottom { border-bottom: 1px solid #4e9a06; }
+
.incognito-mode { /*************************** Check and Radio buttons * */ }
.incognito-mode headerbar { background: #101520 linear-gradient(to top, #171d2e, #1a2235); box-shadow: inset
0 1px rgba(231, 234, 243, 0.07); border-color: #36456b; }
diff --git a/src/resources/themes/_shared-base.scss b/src/resources/themes/_shared-base.scss
index 405a58cd1..7e5d60ca8 100644
--- a/src/resources/themes/_shared-base.scss
+++ b/src/resources/themes/_shared-base.scss
@@ -221,3 +221,35 @@ dzlsuggestionpopover > revealer > box > elastic > scrolledwindow > viewport > li
.transparent {
background: none;
}
+
+// Preferences languages list drag & drop style classes
+.draggable {
+ &.drag-icon {
+ background: white;
+ border: 1px solid black;
+ }
+
+ &.drag-row {
+ color: gray;
+ background: gtkalpha(gray, 0.2);
+
+ &.drag-hover {
+ border-top: 1px solid #4e9a06;
+ border-bottom: 1px solid #4e9a06;
+ }
+ }
+
+ &.drag-hover {
+ image, label {
+ color: #4e9a06;
+ }
+ }
+
+ &.drag-hover-top {
+ border-top: 1px solid #4e9a06;
+ }
+
+ &.drag-hover-bottom {
+ border-bottom: 1px solid #4e9a06;
+ }
+}
diff --git a/src/resources/themes/elementary.css b/src/resources/themes/elementary.css
index a8e2ac6ef..e0f00de66 100644
--- a/src/resources/themes/elementary.css
+++ b/src/resources/themes/elementary.css
@@ -78,6 +78,18 @@ dzlsuggestionpopover > revealer > box > elastic > scrolledwindow > viewport > li
.transparent { background: none; }
+.draggable.drag-icon { background: white; border: 1px solid black; }
+
+.draggable.drag-row { color: gray; background: alpha(gray,0.2); }
+
+.draggable.drag-row.drag-hover { border-top: 1px solid #4e9a06; border-bottom: 1px solid #4e9a06; }
+
+.draggable.drag-hover image, .draggable.drag-hover label { color: #4e9a06; }
+
+.draggable.drag-hover-top { border-top: 1px solid #4e9a06; }
+
+.draggable.drag-hover-bottom { border-bottom: 1px solid #4e9a06; }
+
.page-menu-contents { margin-left: 0px; margin-right: 0px; margin-bottom: 6px; }
.page-menu-zoom-box { margin-bottom: 6px; }
diff --git a/src/resources/themes/shared.css b/src/resources/themes/shared.css
index af4d66b9c..80527d428 100644
--- a/src/resources/themes/shared.css
+++ b/src/resources/themes/shared.css
@@ -77,3 +77,15 @@ dzlsuggestionpopover > revealer > box > elastic > scrolledwindow > viewport > li
.download_progress trough { min-width: 14px; }
.transparent { background: none; }
+
+.draggable.drag-icon { background: white; border: 1px solid black; }
+
+.draggable.drag-row { color: gray; background: alpha(gray,0.2); }
+
+.draggable.drag-row.drag-hover { border-top: 1px solid #4e9a06; border-bottom: 1px solid #4e9a06; }
+
+.draggable.drag-hover image, .draggable.drag-hover label { color: #4e9a06; }
+
+.draggable.drag-hover-top { border-top: 1px solid #4e9a06; }
+
+.draggable.drag-hover-bottom { border-bottom: 1px solid #4e9a06; }
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]