Adding new properties for optimalWidth/Height

remotes/origin/Plasma/5.0
Martin Gräßlin 15 years ago
parent 98b843e51f
commit a38c0e31ca
  1. 6
      tabbox/qml/big_icons.qml
  2. 6
      tabbox/qml/compact.qml
  3. 6
      tabbox/qml/informative.qml
  4. 6
      tabbox/qml/small_icons.qml
  5. 6
      tabbox/qml/text.qml

@ -26,8 +26,10 @@ Item {
property int screenWidth : 0
property int screenHeight : 0
property int imagePathPrefix: (new Date()).getTime()
width: Math.min(Math.max(screenWidth * 0.3, (icons.iconSize + icons.margins.left + icons.margins.right) * icons.count + background.margins.left + background.margins.bottom), screenWidth * 0.9)
height: Math.min(Math.max(screenHeight * 0.05, icons.iconSize + icons.margins.top + icons.margins.bottom + background.margins.top + background.margins.bottom), screenHeight * 0.5)
property int optimalWidth: (icons.iconSize + icons.margins.left + icons.margins.right) * icons.count + background.margins.left + background.margins.bottom
property int optimalHeight: icons.iconSize + icons.margins.top + icons.margins.bottom + background.margins.top + background.margins.bottom
width: Math.min(Math.max(screenWidth * 0.3, optimalWidth), screenWidth * 0.9)
height: Math.min(Math.max(screenHeight * 0.05, optimalHeight), screenHeight * 0.5)
function setModel(model) {

@ -27,8 +27,10 @@ Item {
property int screenHeight : 0
property string longestCaption: ""
property int imagePathPrefix: (new Date()).getTime()
width: Math.min(Math.max(screenWidth * 0.2, compactListView.maxRowWidth), screenWidth * 0.8)
height: Math.min(Math.max(screenHeight * 0.2, compactListView.rowHeight * compactListView.count + background.margins.top + background.margins.bottom), screenHeight * 0.8)
property int optimalWidth: compactListView.maxRowWidth
property int optimalHeight: compactListView.rowHeight * compactListView.count + background.margins.top + background.margins.bottom
width: Math.min(Math.max(screenWidth * 0.2, optimalWidth), screenWidth * 0.8)
height: Math.min(Math.max(screenHeight * 0.2, optimalHeight), screenHeight * 0.8)
property int textMargin: 2

@ -28,8 +28,10 @@ Item {
property bool allDesktops: true
property string longestCaption: ""
property int imagePathPrefix: (new Date()).getTime()
width: Math.min(Math.max(screenWidth * 0.2, listView.maxRowWidth), screenWidth * 0.8)
height: Math.min(Math.max(screenHeight * 0.2, listView.rowHeight * listView.count + background.margins.top + background.margins.bottom), screenHeight * 0.8)
property int optimalWidth: listView.maxRowWidth
property int optimalHeight: listView.rowHeight * listView.count + background.margins.top + background.margins.bottom
width: Math.min(Math.max(screenWidth * 0.2, optimalWidth), screenWidth * 0.8)
height: Math.min(Math.max(screenHeight * 0.2, optimalHeight), screenHeight * 0.8)
property int textMargin: 2

@ -26,8 +26,10 @@ Item {
property int screenWidth : 0
property int screenHeight : 0
property int imagePathPrefix: (new Date()).getTime()
width: Math.min(Math.max(screenWidth * 0.1, (icons.iconSize + icons.margins.left + icons.margins.right) * icons.count + background.margins.left + background.margins.bottom), screenWidth * 0.9)
height: Math.min(Math.max(screenHeight * 0.05, icons.iconSize + icons.margins.top + icons.margins.bottom + background.margins.top + background.margins.bottom), screenHeight * 0.5)
property int optimalWidth: (icons.iconSize + icons.margins.left + icons.margins.right) * icons.count + background.margins.left + background.margins.bottom
property int optimalHeight: icons.iconSize + icons.margins.top + icons.margins.bottom + background.margins.top + background.margins.bottom
width: Math.min(Math.max(screenWidth * 0.1, optimalWidth), screenWidth * 0.9)
height: Math.min(Math.max(screenHeight * 0.05, optimalHeight), screenHeight * 0.5)
function setModel(model) {

@ -26,8 +26,10 @@ Item {
property int screenWidth : 0
property int screenHeight : 0
property string longestCaption: ""
width: Math.min(Math.max(screenWidth * 0.2, textListView.maxRowWidth), screenWidth * 0.8)
height: Math.min(Math.max(screenHeight * 0.2, textListView.rowHeight * textListView.count + background.margins.top + background.margins.bottom), screenHeight * 0.8)
property int optimalWidth: textListView.maxRowWidth
property int optimalHeight: textListView.rowHeight * textListView.count + background.margins.top + background.margins.bottom
width: Math.min(Math.max(screenWidth * 0.2, optimalWidth), screenWidth * 0.8)
height: Math.min(Math.max(screenHeight * 0.2, optimalHeight), screenHeight * 0.8)
property int textMargin: 2

Loading…
Cancel
Save