Merge lp://staging/~woodrow-shen/unity-greeter/fix-hidpi-support into lp://staging/unity-greeter

Proposed by Woodrow Shen
Status: Rejected
Rejected by: Robert Ancell
Proposed branch: lp://staging/~woodrow-shen/unity-greeter/fix-hidpi-support
Merge into: lp://staging/unity-greeter
Diff against target: 617 lines (+171/-38) (has conflicts)
13 files modified
NEWS (+8/-0)
configure.ac (+4/-0)
debian/changelog (+11/-0)
src/cairo-utils.vala (+27/-0)
src/dash-box.vala (+8/-4)
src/dash-button.vala (+3/-1)
src/dash-entry.vala (+8/-3)
src/greeter-list.vala (+13/-8)
src/list-stack.vala (+2/-1)
src/main-window.vala (+4/-1)
src/menubar.vala (+14/-2)
src/prompt-box.vala (+26/-9)
src/shutdown-dialog.vala (+43/-9)
Text conflict in NEWS
Text conflict in configure.ac
Text conflict in debian/changelog
To merge this branch: bzr merge lp://staging/~woodrow-shen/unity-greeter/fix-hidpi-support
Reviewer Review Type Date Requested Status
Robert Ancell Pending
Review via email: mp+242046@code.staging.launchpad.net

Commit message

This patch try to fix the problem that unity-greeter can't scale on a hidpi display.
Currenly the icons on menubar still don't work, and sometimes menuitem may unchanged
unexpectedly.

Description of the change

The fix can scale menubar, prompt-box, and shutdown-dialog box according to gnome hidpi rules from https://wiki.gnome.org/HowDoI/HiDpi. so I just added hidpi checking into cairo-utils for temporary. But icons on menubar seem that it's hard to scale even if I used to re-scale by gtk.image. Besides, the scale factor is fixed to 2 for hidpi condition.

To post a comment you must log in.
Revision history for this message
Robert Ancell (robert-ancell) wrote :

This branch shows merge conflicts - should this have been proposed to lp:unity-greeter/14.04?

Revision history for this message
Robert Ancell (robert-ancell) wrote :

In check_hidpi_display you iterate across all the monitors but only check the primary one. Why not just:

screen.get_monitor_geometry(primary, out area)

Revision history for this message
Robert Ancell (robert-ancell) wrote :

You have a number of cases where you've used an explicit variable type, e.g. "int num_monitor" where you could just use "var num_monitor" instead.

Revision history for this message
Robert Ancell (robert-ancell) wrote :

You have a lot of hardcoded scaling like:

var hidpi = CairoUtils.check_hidpi_display();
scale = (hidpi) ? 2 : 1;

Why not:
scale = CairoUtils.get_hidpi_scale ()

and just define the 2 once in that function?

Revision history for this message
Robert Ancell (robert-ancell) wrote :

It otherwise looks pretty good. Thanks Woodrow!

Revision history for this message
Woodrow Shen (woodrow-shen) wrote :

ok, I will re-modify it and re-send proposal to lp:unity-greeter/14.04. You just reject this merge proposal ?

Revision history for this message
Robert Ancell (robert-ancell) wrote :

You should update this proposal to apply to trunk and also make one that applies to 14.04 - otherwise users in 15.04 will not have hidpi support. We should also consider making an MP that applies to 14.10. This is easy to do once this is applied to trunk:

$ bzr branch lp:unity-greeter/14.04
$ cd 14.04
$ bzr merge -c <commit> lp:unity-greeter
$ bzr commit
(make merge request)

1207. By Woodrow Shen

Use get_hidpi_scale function to replace hard-code.

1208. By Woodrow Shen

Fix the some code style.

1209. By Woodrow Shen

Fix the correct space number without tab.

Revision history for this message
Robert Ancell (robert-ancell) wrote :
Revision history for this message
Robert Ancell (robert-ancell) wrote :

Rejecting this MP because it's out of sync and according to https://code.launchpad.net/~fourdollars/unity-greeter/add-hidpi-support/+merge/244266 it should be obsolete.

Unmerged revisions

1209. By Woodrow Shen

Fix the correct space number without tab.

1208. By Woodrow Shen

Fix the some code style.

1207. By Woodrow Shen

Use get_hidpi_scale function to replace hard-code.

1206. By Woodrow Shen

This patch try to fix the problem that unity-greeter can't scale on a hidpi display.
Currenly the icons on menubar still don't work, and sometimes menuitem may unchanged
unexpectedly.

1205. By Robert Ancell

Releasing 14.04.10

1204. By Robert Ancell

Require user to acknowledge messages after last prompt

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches