[gnome-flashback/wip/segeiger/gnome-3-18-stylefixes: 3/3] input-sources: fix GfCandidatePopup style
- From: Sebastian Geiger <segeiger src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-flashback/wip/segeiger/gnome-3-18-stylefixes: 3/3] input-sources: fix GfCandidatePopup style
- Date: Fri, 22 Jan 2016 20:45:03 +0000 (UTC)
commit 9d975bccf5de8f90106d6d0cab0519cd5faeeedc
Author: Sebastian Geiger <sbastig gmx net>
Date: Fri Jan 22 20:54:44 2016 +0100
input-sources: fix GfCandidatePopup style
Backported from commit: 2bf160b565bcafd136198cedf7340ea4646c2bdb
gnome-flashback/Adwaita.css | 23 ++++++++++++++++++++
gnome-flashback/HighContrast.css | 23 ++++++++++++++++++++
.../libinput-sources/gf-candidate-area.c | 2 +-
.../libinput-sources/gf-candidate-box.c | 2 +
.../libinput-sources/gf-candidate-popup.c | 4 ++-
5 files changed, 52 insertions(+), 2 deletions(-)
---
diff --git a/gnome-flashback/Adwaita.css b/gnome-flashback/Adwaita.css
index 99a0209..ca83994 100644
--- a/gnome-flashback/Adwaita.css
+++ b/gnome-flashback/Adwaita.css
@@ -11,6 +11,29 @@ GfPopupWindow.solid {
border-radius: 0;
}
+GfCandidatePopup {
+ border-radius: 3px;
+}
+
+GfCandidatePopup.solid {
+ border-radius: 0;
+}
+
+GfCandidatePopup GfCandidateBox GtkLabel {
+ padding: 4px 6px;
+}
+
+GfCandidatePopup GfCandidateBox:last-child {
+ padding-left: 0;
+}
+
+GfCandidatePopup GfCandidateBox:selected,
+GfCandidatePopup GfCandidateBox:hover {
+ background-color: #4a90d9;
+ color: #ffffff;
+ border-radius: 3px;
+}
+
GfInputSourcePopup #input-source
{
font-size: 22px;
diff --git a/gnome-flashback/HighContrast.css b/gnome-flashback/HighContrast.css
index 1fb4c28..13a2ff3 100644
--- a/gnome-flashback/HighContrast.css
+++ b/gnome-flashback/HighContrast.css
@@ -11,6 +11,29 @@ GfPopupWindow.solid {
border-radius: 0px;
}
+GfCandidatePopup {
+ border-radius: 3px;
+}
+
+GfCandidatePopup.solid {
+ border-radius: 0;
+}
+
+GfCandidatePopup GfCandidateBox label {
+ padding: 4px 6px;
+}
+
+GfCandidatePopup GfCandidateBox:last-child {
+ padding-left: 0;
+}
+
+GfCandidatePopup GfCandidateBox:selected,
+GfCandidatePopup GfCandidateBox:hover {
+ background-color: #4a90d9;
+ color: #ffffff;
+ border-radius: 3px;
+}
+
GfInputSourcePopup #input-source
{
font-size: 22px;
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 f1bb2ff..1dc5e2a 100644
--- a/gnome-flashback/libinput-sources/gf-candidate-box.c
+++ b/gnome-flashback/libinput-sources/gf-candidate-box.c
@@ -139,6 +139,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..9554675 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,8 @@ 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_container_set_border_width (GTK_CONTAINER (popup), 10);
}
GfCandidatePopup *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]