Merge lp://qastaging/~unity-2d-team/unity-2d/unity-2d-formfactor-fixes into lp://qastaging/unity-2d

Proposed by Ugo Riboni
Status: Rejected
Rejected by: Florian Boucault
Proposed branch: lp://qastaging/~unity-2d-team/unity-2d/unity-2d-formfactor-fixes
Merge into: lp://qastaging/unity-2d
Diff against target: 743 lines (+148/-226)
13 files modified
data/com.canonical.Unity2d.gschema.xml (+7/-0)
libunity-2d-private/Unity2d/plugin.cpp (+5/-4)
libunity-2d-private/src/CMakeLists.txt (+0/-1)
libunity-2d-private/src/dashclient.cpp (+52/-1)
libunity-2d-private/src/dashclient.h (+13/-1)
libunity-2d-private/src/dashsettings.cpp (+0/-112)
libunity-2d-private/src/dashsettings.h (+0/-72)
panel/applets/appname/windowhelper.cpp (+32/-14)
panel/applets/appname/windowhelper.h (+2/-0)
places/app/dash.xml (+9/-0)
places/app/dashdeclarativeview.cpp (+15/-16)
places/app/dashdeclarativeview.h (+4/-1)
places/dash.qml (+9/-4)
To merge this branch: bzr merge lp://qastaging/~unity-2d-team/unity-2d/unity-2d-formfactor-fixes
Reviewer Review Type Date Requested Status
Florian Boucault Pending
Review via email: mp+89748@code.qastaging.launchpad.net

Commit message

[dash] Properly use com/canonical/unity-2d/form-factor to decide if dash can be resized or should stay fullscreen

Description of the change

[dash] Properly use com/canonical/unity-2d/form-factor to decide if dash can be resized or should stay fullscreen

Before desktop/unity/form-factor was used.
This is wrong because this property for Unity 3D means "is the dash fullscreen or not".
For unity 2d instead the concept of form factor reflects what device we're targeting (tv, phone, etc).

To fix this the following changes were made:
- Added to the dash DBUS API a fullScreen property and signal
- Added to the DashClient a proxy for this API
- Use it form the panel to know if the Dash is fullscreen or not (instead of checking its size, which was error prone and won't work with shell anyway).

Another problem was that even if the dash is in desktop for factor, the dash should always be fullscreen if the screen resolution is smaller than a certain threshold.
This was checked in dashDeclarativeView but it was overwriting the formfactor check in QML.
So I fixed this by moving the entire combined check (formfactor + resolution) to QML.

The panel also allowed to resize the dash to non-fullscreen even when it shouldn't have been allowed by form factor, so I fixed that too by checking and listening to changed in the formfactor dconf key in the panel.

This left DashSettings with only the functions to get the threshold, so I went ahead and moved it to DashClient, and removed DashSettings entirely. Having both classes seemed quite pointeless.

To post a comment you must log in.
Revision history for this message
Florian Boucault (fboucault) wrote :

Let's split that work into 3 pieces:
1) Replace use of dconf key Unity.formFactor with Unity2d.dashFullScreen
2) Move code from DashSettings into DashClient:
- create new property 'minimumSizeForDesktop'
- create new property 'alwaysFullScreen'
3) Introduce new dconf key Unity2d.formFactor
- add the check for formFactor in alwaysFullScreen

Revision history for this message
Ugo Riboni (uriboni) wrote :
Revision history for this message
Ugo Riboni (uriboni) wrote :
Revision history for this message
Ugo Riboni (uriboni) wrote :

Unmerged revisions

867. By Ugo Riboni

Prevent resizing the dash from the panel buttons if the form factor isn't desktop

866. By Ugo Riboni

Remove the empty class DashSettings. All its content has been either obsoleted or moved to DashClient.

865. By Ugo Riboni

Move minimumSizeForDesktop to DashClient. Use it to move setDashModeDependingOnScreenGeometry entirely to QML.

864. By Ugo Riboni

Don't update dash fullscreen based on geometry every time the dash becomes active. It will overwrite any defaults when it should merge with them instead.

863. By Ugo Riboni

Add the missing unity-2d form factor key to dconf. Expose the unity2dConfiguration QConf object to access it to QML.

862. By Ugo Riboni

Completely remove proxying the Unity 3D form factor dconf key. It's not used anymore (DashClient::fullScreen is used instead)

861. By Ugo Riboni

Expose the full screen state of the dash via DBUS. Use it to control the dash from the panel buttons.

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