Changeset View
Changeset View
Standalone View
Standalone View
src/qml/ViewSelector.qml
Show All 32 Lines | 25 | FocusScope { | |||
---|---|---|---|---|---|
33 | 33 | | |||
34 | function setCurrentIndex(index) | 34 | function setCurrentIndex(index) | ||
35 | { | 35 | { | ||
36 | viewModeView.ignoreCurrentItemChanges = true | 36 | viewModeView.ignoreCurrentItemChanges = true | ||
37 | viewModeView.currentIndex = index | 37 | viewModeView.currentIndex = index | ||
38 | viewModeView.ignoreCurrentItemChanges = false | 38 | viewModeView.ignoreCurrentItemChanges = false | ||
39 | } | 39 | } | ||
40 | 40 | | |||
41 | implicitWidth: elisaTheme.dp(225) | 41 | implicitWidth: 225 | ||
42 | 42 | | |||
43 | ScrollView { | 43 | ScrollView { | ||
44 | focus: true | 44 | focus: true | ||
45 | 45 | | |||
46 | anchors.fill: parent | 46 | anchors.fill: parent | ||
47 | z: 2 | 47 | z: 2 | ||
48 | 48 | | |||
49 | clip: true | 49 | clip: true | ||
▲ Show 20 Lines • Show All 72 Lines • ▼ Show 20 Line(s) | |||||
122 | 122 | | |||
123 | states: [ | 123 | states: [ | ||
124 | State { | 124 | State { | ||
125 | name: 'iconsAndText' | 125 | name: 'iconsAndText' | ||
126 | when: mainWindow.width >= elisaTheme.viewSelectorSmallSizeThreshold | 126 | when: mainWindow.width >= elisaTheme.viewSelectorSmallSizeThreshold | ||
127 | PropertyChanges { | 127 | PropertyChanges { | ||
128 | target: rootFocusScope | 128 | target: rootFocusScope | ||
129 | textOpacity: 1 | 129 | textOpacity: 1 | ||
130 | implicitWidth: elisaTheme.dp(225) | 130 | implicitWidth: 225 | ||
131 | } | 131 | } | ||
132 | }, | 132 | }, | ||
133 | State { | 133 | State { | ||
134 | name: 'iconsOnly' | 134 | name: 'iconsOnly' | ||
135 | when: mainWindow.width < elisaTheme.viewSelectorSmallSizeThreshold | 135 | when: mainWindow.width < elisaTheme.viewSelectorSmallSizeThreshold | ||
136 | PropertyChanges { | 136 | PropertyChanges { | ||
137 | target: rootFocusScope | 137 | target: rootFocusScope | ||
138 | textOpacity: 0 | 138 | textOpacity: 0 | ||
139 | implicitWidth: elisaTheme.viewSelectorDelegateHeight + 2 * elisaTheme.layoutHorizontalMargin | 139 | implicitWidth: elisaTheme.viewSelectorDelegateHeight + 2 * elisaTheme.layoutHorizontalMargin | ||
140 | } | 140 | } | ||
141 | } | 141 | } | ||
142 | ] | 142 | ] | ||
143 | } | 143 | } |