Code review comment for lp:~dandrader/unity8/childWindows

Revision history for this message
Gerry Boland (gerboland) wrote :

+++ qml/Stage/ChildWindowTree.qml

Just a thought:

+ readonly property bool maximized: false
+ readonly property bool maximizedLeft: false
+ readonly property bool maximizedRight: false
+ readonly property bool maximizedHorizontally: false
+ readonly property bool maximizedVertically: false
+ readonly property bool maximizedTopLeft: false
+ readonly property bool maximizedTopRight: false
+ readonly property bool maximizedBottomLeft: false
+ readonly property bool maximizedBottomRight: false

Only one of these can be set true at any time, am I right? In that case, perhaps an enum would be less wordy, and reduce chances of logic error (multiple trues)

MaximizedState.qml:

pragma Singleton
import QtQuick 2.5
QtObject {
    id: singleton

    property bool maximized: 0
    property bool maximizedLeft: 1
    property bool maximizedRight: 2
...
}

and then use readonly property MaximizedState instead.

« Back to merge proposal