mirror of https://github.com/nextcloud/desktop
Use the font size that Qt suggest
Fixes: https://github.com/nextcloud/desktop/issues/3797 Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
This commit is contained in:
parent
f21d064b4f
commit
99457e8c38
|
@ -216,7 +216,7 @@ MouseArea {
|
|||
anchors.right: moreActionsButton.right
|
||||
anchors.top: moreActionsButton.top
|
||||
|
||||
Menu {
|
||||
AutoSizingMenu {
|
||||
id: moreActionsButtonContextMenu
|
||||
anchors.centerIn: parent
|
||||
|
||||
|
|
|
@ -111,14 +111,12 @@ MenuItem {
|
|||
width: parent.width
|
||||
Label {
|
||||
id: emoji
|
||||
height: Style.topLinePixelSize
|
||||
visible: model.statusEmoji !== ""
|
||||
text: statusEmoji
|
||||
topPadding: -Style.accountLabelsSpacing
|
||||
}
|
||||
Label {
|
||||
id: message
|
||||
height: Style.topLinePixelSize
|
||||
width: parent.width - parent.spacing - emoji.width
|
||||
visible: model.statusMessage !== ""
|
||||
text: statusMessage
|
||||
|
@ -169,9 +167,8 @@ MenuItem {
|
|||
y: userMoreButton.y + 1
|
||||
}
|
||||
|
||||
Menu {
|
||||
AutoSizingMenu {
|
||||
id: userMoreButtonMenu
|
||||
width: 120
|
||||
closePolicy: Menu.CloseOnPressOutsideParent | Menu.CloseOnEscape
|
||||
|
||||
background: Rectangle {
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
pragma Singleton
|
||||
|
||||
// Minimum for this is Qt 5.5
|
||||
import QtQuick 2.5
|
||||
import QtQuick 2.15
|
||||
|
||||
import com.nextcloud.desktopclient 1.0
|
||||
|
||||
QtObject {
|
||||
Item {
|
||||
readonly property int pixelSize: fontMetrics.font.pixelSize
|
||||
|
||||
// Colors
|
||||
property color ncBlue: Theme.wizardHeaderBackgroundColor
|
||||
property color ncTextColor: Theme.wizardHeaderTitleColor
|
||||
|
@ -19,15 +20,15 @@ QtObject {
|
|||
|
||||
// Fonts
|
||||
// We are using pixel size because this is cross platform comparable, point size isn't
|
||||
property int topLinePixelSize: 12
|
||||
property int subLinePixelSize: 10
|
||||
readonly property int topLinePixelSize: pixelSize
|
||||
readonly property int subLinePixelSize: topLinePixelSize - 2
|
||||
|
||||
// Dimensions and sizes
|
||||
property int trayWindowWidth: 400
|
||||
property int trayWindowHeight: 510
|
||||
property int trayWindowWidth: variableSize(400)
|
||||
property int trayWindowHeight: variableSize(510)
|
||||
property int trayWindowRadius: 10
|
||||
property int trayWindowBorderWidth: 1
|
||||
property int trayWindowHeaderHeight: 60
|
||||
property int trayWindowHeaderHeight: variableSize(60)
|
||||
|
||||
property int currentAccountButtonWidth: 220
|
||||
property int currentAccountButtonRadius: 2
|
||||
|
@ -72,4 +73,12 @@ QtObject {
|
|||
readonly property int unifiedSearchResulSublineFontSize: subLinePixelSize
|
||||
readonly property string unifiedSearchResulTitleColor: "black"
|
||||
readonly property string unifiedSearchResulSublineColor: "grey"
|
||||
|
||||
function variableSize(size) {
|
||||
return size * (1 + Math.min(pixelSize / 100, 1));
|
||||
}
|
||||
|
||||
FontMetrics {
|
||||
id: fontMetrics
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue