width: parent.width\r
Label {\r
id: emoji\r
- height: Style.topLinePixelSize\r
visible: model.statusEmoji !== ""\r
text: statusEmoji\r
topPadding: -Style.accountLabelsSpacing\r
}\r
Label {\r
id: message\r
- height: Style.topLinePixelSize\r
width: parent.width - parent.spacing - emoji.width\r
visible: model.statusMessage !== ""\r
text: statusMessage\r
y: userMoreButton.y + 1\r
}\r
\r
- Menu {\r
+ AutoSizingMenu {\r
id: userMoreButtonMenu\r
- width: 120\r
closePolicy: Menu.CloseOnPressOutsideParent | Menu.CloseOnEscape\r
\r
background: Rectangle {\r
pragma Singleton\r
\r
-// Minimum for this is Qt 5.5\r
-import QtQuick 2.5\r
+import QtQuick 2.15\r
\r
import com.nextcloud.desktopclient 1.0\r
\r
-QtObject {\r
+Item {\r
+ readonly property int pixelSize: fontMetrics.font.pixelSize\r
+\r
// Colors\r
property color ncBlue: Theme.wizardHeaderBackgroundColor\r
property color ncTextColor: Theme.wizardHeaderTitleColor\r
\r
// Fonts\r
// We are using pixel size because this is cross platform comparable, point size isn't\r
- property int topLinePixelSize: 12\r
- property int subLinePixelSize: 10\r
+ readonly property int topLinePixelSize: pixelSize\r
+ readonly property int subLinePixelSize: topLinePixelSize - 2\r
\r
// Dimensions and sizes\r
- property int trayWindowWidth: 400\r
- property int trayWindowHeight: 510\r
+ property int trayWindowWidth: variableSize(400)\r
+ property int trayWindowHeight: variableSize(510)\r
property int trayWindowRadius: 10\r
property int trayWindowBorderWidth: 1\r
- property int trayWindowHeaderHeight: 60\r
+ property int trayWindowHeaderHeight: variableSize(60)\r
\r
property int currentAccountButtonWidth: 220\r
property int currentAccountButtonRadius: 2\r
readonly property int unifiedSearchResulSublineFontSize: subLinePixelSize\r
readonly property string unifiedSearchResulTitleColor: "black"\r
readonly property string unifiedSearchResulSublineColor: "grey"\r
+\r
+ function variableSize(size) {\r
+ return size * (1 + Math.min(pixelSize / 100, 1)); \r
+ }\r
+\r
+ FontMetrics {\r
+ id: fontMetrics\r
+ }\r
}\r