Style.qml 3.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. pragma Singleton
  2. import QtQuick 2.15
  3. import com.nextcloud.desktopclient 1.0
  4. QtObject {
  5. readonly property int pixelSize: fontMetrics.font.pixelSize
  6. // Colors
  7. readonly property color ncBlue: Theme.wizardHeaderBackgroundColor
  8. readonly property color ncTextColor: Theme.systemPalette.windowText
  9. readonly property color ncSecondaryTextColor: "#808080"
  10. readonly property color ncHeaderTextColor: "white"
  11. readonly property color lightHover: Theme.systemPalette.highlight
  12. readonly property color menuBorder: Systray.darkMode ? Qt.lighter(backgroundColor, 3) : Qt.darker(backgroundColor, 1.5)
  13. readonly property color backgroundColor: Theme.systemPalette.base
  14. // ErrorBox colors
  15. readonly property color errorBoxTextColor: Theme.errorBoxTextColor
  16. readonly property color errorBoxBackgroundColor: Theme.errorBoxBackgroundColor
  17. readonly property color errorBoxBorderColor: Theme.errorBoxBorderColor
  18. // Fonts
  19. // We are using pixel size because this is cross platform comparable, point size isn't
  20. readonly property int topLinePixelSize: pixelSize
  21. readonly property int subLinePixelSize: topLinePixelSize - 2
  22. // Dimensions and sizes
  23. property int trayWindowWidth: variableSize(400)
  24. property int trayWindowHeight: variableSize(510)
  25. property int trayWindowRadius: 10
  26. property int trayWindowBorderWidth: 1
  27. property int trayWindowHeaderHeight: variableSize(60)
  28. property int trayHorizontalMargin: 10
  29. property int trayListItemIconSize: accountAvatarSize
  30. property int currentAccountButtonWidth: 220
  31. property int currentAccountButtonRadius: 2
  32. property int currentAccountLabelWidth: 128
  33. property url stateOnlineImageSource: Theme.stateOnlineImageSource
  34. property url stateOfflineImageSource: Theme.stateOfflineImageSource
  35. property int accountAvatarSize: (trayWindowHeaderHeight - 16)
  36. property int accountAvatarStateIndicatorSize: 16
  37. property int folderStateIndicatorSize: 16
  38. property int accountLabelWidth: 128
  39. property int accountDropDownCaretSize: 20
  40. property int accountDropDownCaretMargin: 8
  41. property int addAccountButtonHeight: 50
  42. property int headerButtonIconSize: 32
  43. property int activityLabelBaseWidth: 240
  44. property int activityItemActionPrimaryButtonMinWidth: 100
  45. property int activityItemActionSecondaryButtonMinWidth: 80
  46. property int roundButtonBackgroundVerticalMargins: 10
  47. property int roundedButtonBackgroundVerticalMargins: 5
  48. property int userStatusEmojiSize: 8
  49. property int userStatusSpacing: trayHorizontalMargin
  50. property int userStatusAnchorsMargin: 2
  51. property int accountServerAnchorsMargin: 10
  52. property int accountLabelsSpacing: 4
  53. property int accountLabelsAnchorsMargin: 7
  54. property int accountLabelsLayoutMargin: 12
  55. property int accountLabelsLayoutTopMargin: 10
  56. // Visual behaviour
  57. property bool hoverEffectsEnabled: true
  58. // unified search constants
  59. readonly property int unifiedSearchItemHeight: trayWindowHeaderHeight
  60. readonly property int unifiedSearchResultTextLeftMargin: 18
  61. readonly property int unifiedSearchResultTextRightMargin: 16
  62. readonly property int unifiedSearchResulIconWidth: 24
  63. readonly property int unifiedSearchResulIconLeftMargin: 12
  64. readonly property int unifiedSearchResulTitleFontSize: topLinePixelSize
  65. readonly property int unifiedSearchResulSublineFontSize: subLinePixelSize
  66. readonly property var fontMetrics: FontMetrics {}
  67. function variableSize(size) {
  68. return size * (1 + Math.min(pixelSize / 100, 1));
  69. }
  70. }