Merge lp:~feng-kylin/kylin-greeter/fixgtk320 into lp:~zctgbhu/kylin-greeter/trunk

Proposed by handsome_feng
Status: Merged
Approved by: zhangchao
Approved revision: 73
Merged at revision: 72
Proposed branch: lp:~feng-kylin/kylin-greeter/fixgtk320
Merge into: lp:~zctgbhu/kylin-greeter/trunk
Diff against target: 112 lines (+14/-9)
6 files modified
src/dash-button.vala (+1/-1)
src/flat-button.vala (+2/-3)
src/greeter-list.vala (+5/-2)
src/main-window.vala (+4/-2)
src/prompt-box.vala (+1/-1)
src/user-list.vala (+1/-0)
To merge this branch: bzr merge lp:~feng-kylin/kylin-greeter/fixgtk320
Reviewer Review Type Date Requested Status
zhangchao Approve
Review via email: mp+306298@code.launchpad.net

Description of the change

Fixed the issue when upgrade to gtk3.20.

To post a comment you must log in.
73. By handsome_feng

Added queue_resize and Allocation

Revision history for this message
zhangchao (zctgbhu) wrote :

great!3Q

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/dash-button.vala'
2--- src/dash-button.vala 2015-12-04 08:45:17 +0000
3+++ src/dash-button.vala 2016-09-27 06:57:50 +0000
4@@ -70,7 +70,7 @@
5 {
6 var style = new Gtk.CssProvider ();
7 style.load_from_data ("* {padding: 6px 8px 6px 8px;
8- -GtkWidget-focus-line-width: 0px;
9+ -GtkWidget-outline-width: 0px;
10 }", -1);
11 this.get_style_context ().add_provider (style, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);
12 }
13
14=== modified file 'src/flat-button.vala'
15--- src/flat-button.vala 2015-12-04 08:45:17 +0000
16+++ src/flat-button.vala 2016-09-27 06:57:50 +0000
17@@ -29,9 +29,8 @@
18 try
19 {
20 var style = new Gtk.CssProvider ();
21- style.load_from_data ("* {-GtkButton-child-displacement-x: 0px;
22- -GtkButton-child-displacement-y: 0px;
23- -GtkWidget-focus-line-width: 0px;
24+ style.load_from_data ("* {
25+ -GtkWidget-outline-width: 0px;
26 }", -1);
27 get_style_context ().add_provider (style, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);
28 }
29
30=== modified file 'src/greeter-list.vala'
31--- src/greeter-list.vala 2016-06-12 06:58:31 +0000
32+++ src/greeter-list.vala 2016-09-27 06:57:50 +0000
33@@ -757,6 +757,8 @@
34 /* Stop when we get there */
35 if (progress >= 1.0)
36 finished_scrolling ();
37+
38+ queue_resize ();
39 }
40
41 private void finished_scrolling ()
42@@ -931,16 +933,17 @@
43 {
44 if(status==Status.LOGINBOX)
45 {
46- debug("~~~~~~~~back_userlist_cb");
47 status=Status.USERLIST;
48
49 move_names ();
50 UnityGreeter.singleton.set_scroll_button_status();
51 selected_entry.hide_prompts();
52 }else if(status==Status.SESSIONLIST)
53- {debug("~~~~~~~~back_userlist_cb,back_loginbox");
54+ {
55 UnityGreeter.singleton.pop_list();
56 }
57+
58+ queue_resize ();
59 }
60
61 /* Not all subclasses are going to be interested in talking to lightdm, but for those that are, make it easy. */
62
63=== modified file 'src/main-window.vala'
64--- src/main-window.vala 2016-08-17 03:23:49 +0000
65+++ src/main-window.vala 2016-09-27 06:57:50 +0000
66@@ -225,10 +225,9 @@
67
68 //add bottom_box
69 var bottom_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 0);
70- bottom_box.expand = true;
71 bottom_box.show ();
72+ bottom_box.set_size_request (-1, BOTTOM_HEIGHT);
73 login_box.add (bottom_box);
74- scroll_down_button_align.set_size_request (-1,BOTTOM_HEIGHT);
75
76 if (UnityGreeter.singleton.test_mode)
77 {
78@@ -453,6 +452,9 @@
79 private void move_to_monitor (Monitor monitor)
80 {
81 active_monitor = monitor;
82+ var alloc = Gtk.Allocation();
83+ alloc.width = monitor.width;
84+ login_box.size_allocate_with_baseline(alloc, -1);
85 login_box.set_size_request (monitor.width, monitor.height);
86 stack.set_size(monitor.width,monitor.height-BUTTONBOX_HEIGHT-SCROLL_BUTTON_HEIGHT*2-BOTTOM_HEIGHT);
87
88
89=== modified file 'src/prompt-box.vala'
90--- src/prompt-box.vala 2016-08-17 03:23:49 +0000
91+++ src/prompt-box.vala 2016-09-27 06:57:50 +0000
92@@ -711,7 +711,7 @@
93 {
94 base.size_allocate (allocation);
95 box_grid.size_allocate (allocation);
96- //debug("~~~~~~~~allocation.x=%d~~allocation.y=%d~~allocation.height=%d~~allocation.width=%d",allocation.x,allocation.y,allocation.height,allocation.width);
97+ //debug("allocation=%d:%d:%d:%d",allocation.x,allocation.y,allocation.height,allocation.width);
98 int small_height;
99 small_box_widget.get_preferred_height (null, out small_height);
100 allocation.height = small_height;
101
102=== modified file 'src/user-list.vala'
103--- src/user-list.vala 2016-06-07 09:28:43 +0000
104+++ src/user-list.vala 2016-09-27 06:57:50 +0000
105@@ -642,6 +642,7 @@
106 var userbox = selected_entry as UserPromptBox;
107 if (userbox != null)
108 selected_entry.set_is_active (userbox.is_active);
109+ queue_resize ();
110 }
111
112 private void entry_selected_cb (string? username)

Subscribers

People subscribed via source and target branches

to all changes: