[gnome-flashback] input-sources: fix GfCandidatePopup style



commit 2bf160b565bcafd136198cedf7340ea4646c2bdb
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Tue Jan 19 15:19:07 2016 +0200

    input-sources: fix GfCandidatePopup style

 data/theme/Adwaita/gnome-flashback-dark.css        |   23 ++++++++++++++++++++
 data/theme/Adwaita/gnome-flashback.css             |   23 ++++++++++++++++++++
 data/theme/HighContrast/gnome-flashback.css        |   23 ++++++++++++++++++++
 .../libinput-sources/gf-candidate-area.c           |    2 +-
 .../libinput-sources/gf-candidate-box.c            |    2 +
 .../libinput-sources/gf-candidate-popup.c          |    5 +++-
 6 files changed, 76 insertions(+), 2 deletions(-)
---
diff --git a/data/theme/Adwaita/gnome-flashback-dark.css b/data/theme/Adwaita/gnome-flashback-dark.css
index 4a0d734..faba4dc 100644
--- a/data/theme/Adwaita/gnome-flashback-dark.css
+++ b/data/theme/Adwaita/gnome-flashback-dark.css
@@ -10,6 +10,29 @@ gf-popup-window.solid {
   border-radius: 0px;
 }
 
+#gf-candidate-popup {
+  border-radius: 3px;
+}
+
+#gf-candidate-popup.solid {
+  border-radius: 0px;
+}
+
+#gf-candidate-popup gf-candidate-box label {
+  padding: 4px 6px;
+}
+
+#gf-candidate-popup gf-candidate-box label:last-child {
+  padding-left: 0px;
+}
+
+#gf-candidate-popup gf-candidate-box:selected,
+#gf-candidate-popup gf-candidate-box:hover {
+  background-color: #215d9c;
+  color: #ffffff;
+  border-radius: 3px;
+}
+
 #gf-input-source-popup {
 }
 
diff --git a/data/theme/Adwaita/gnome-flashback.css b/data/theme/Adwaita/gnome-flashback.css
index 3802f18..e79fb2f 100644
--- a/data/theme/Adwaita/gnome-flashback.css
+++ b/data/theme/Adwaita/gnome-flashback.css
@@ -10,6 +10,29 @@ gf-popup-window.solid {
   border-radius: 0px;
 }
 
+#gf-candidate-popup {
+  border-radius: 3px;
+}
+
+#gf-candidate-popup.solid {
+  border-radius: 0px;
+}
+
+#gf-candidate-popup gf-candidate-box label {
+  padding: 4px 6px;
+}
+
+#gf-candidate-popup gf-candidate-box label:last-child {
+  padding-left: 0px;
+}
+
+#gf-candidate-popup gf-candidate-box:selected,
+#gf-candidate-popup gf-candidate-box:hover {
+  background-color: #4a90d9;
+  color: #ffffff;
+  border-radius: 3px;
+}
+
 #gf-input-source-popup {
 }
 
diff --git a/data/theme/HighContrast/gnome-flashback.css b/data/theme/HighContrast/gnome-flashback.css
index 4ad1416..7af36e0 100644
--- a/data/theme/HighContrast/gnome-flashback.css
+++ b/data/theme/HighContrast/gnome-flashback.css
@@ -10,6 +10,29 @@ gf-popup-window.solid {
   border-radius: 0px;
 }
 
+#gf-candidate-popup {
+  border-radius: 3px;
+}
+
+#gf-candidate-popup.solid {
+  border-radius: 0px;
+}
+
+#gf-candidate-popup gf-candidate-box label {
+  padding: 4px 6px;
+}
+
+#gf-candidate-popup gf-candidate-box label:last-child {
+  padding-left: 0px;
+}
+
+#gf-candidate-popup gf-candidate-box:selected,
+#gf-candidate-popup gf-candidate-box:hover {
+  background-color: #4a90d9;
+  color: #ffffff;
+  border-radius: 3px;
+}
+
 #gf-input-source-popup {
 }
 
diff --git a/gnome-flashback/libinput-sources/gf-candidate-area.c 
b/gnome-flashback/libinput-sources/gf-candidate-area.c
index 9f088ff..841b52b 100644
--- a/gnome-flashback/libinput-sources/gf-candidate-area.c
+++ b/gnome-flashback/libinput-sources/gf-candidate-area.c
@@ -131,7 +131,7 @@ gf_candidate_area_init (GfCandidateArea *area)
   GtkIconSize size;
   GtkWidget *image;
 
-  area->candidate_box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
+  area->candidate_box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2);
   gtk_container_add (GTK_CONTAINER (area), area->candidate_box);
   gtk_widget_show (area->candidate_box);
 
diff --git a/gnome-flashback/libinput-sources/gf-candidate-box.c 
b/gnome-flashback/libinput-sources/gf-candidate-box.c
index ae06a33..ce5f8c9 100644
--- a/gnome-flashback/libinput-sources/gf-candidate-box.c
+++ b/gnome-flashback/libinput-sources/gf-candidate-box.c
@@ -141,6 +141,8 @@ gf_candidate_box_init (GfCandidateBox *box)
   box->candidate_label = gtk_label_new (NULL);
   gtk_container_add (GTK_CONTAINER (hbox), box->candidate_label);
   gtk_widget_show (box->candidate_label);
+
+  gtk_widget_set_valign (GTK_WIDGET (box), GTK_ALIGN_CENTER);
 }
 
 GtkWidget*
diff --git a/gnome-flashback/libinput-sources/gf-candidate-popup.c 
b/gnome-flashback/libinput-sources/gf-candidate-popup.c
index 6cfea92..6f13a07 100644
--- a/gnome-flashback/libinput-sources/gf-candidate-popup.c
+++ b/gnome-flashback/libinput-sources/gf-candidate-popup.c
@@ -342,7 +342,7 @@ gf_candidate_popup_init (GfCandidatePopup *popup)
   gtk_window_set_focus_on_map (window, TRUE);
   gtk_window_set_type_hint (window, GDK_WINDOW_TYPE_HINT_NORMAL);
 
-  layout = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
+  layout = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
   gtk_container_add (GTK_CONTAINER (popup), layout);
   gtk_widget_show (layout);
 
@@ -364,6 +364,9 @@ gf_candidate_popup_init (GfCandidatePopup *popup)
                     G_CALLBACK (next_page_cb), popup);
   g_signal_connect (popup->candidate_area, "candidate-clicked",
                     G_CALLBACK (candidate_clicked_cb), popup);
+
+  gtk_widget_set_name (GTK_WIDGET (popup), "gf-candidate-popup");
+  gtk_container_set_border_width (GTK_CONTAINER (popup), 10);
 }
 
 GfCandidatePopup *


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]