Browse Source

add a container for styling constants, so we don't repeat literals all over the code

patch-4
Sander van Grieken 3 years ago
parent
commit
f5807df91c
  1. 16
      electrum/gui/qml/components/Constants.qml
  2. 2
      electrum/gui/qml/components/main.qml

16
electrum/gui/qml/components/Constants.qml

@ -0,0 +1,16 @@
import QtQuick 2.6
import QtQuick.Controls.Material 2.0
QtObject {
readonly property int paddingSmall: 8
readonly property int paddingMedium: 12
readonly property int paddingLarge: 16
readonly property int paddingXLarge: 20
readonly property int fontSizeXSmall: 10
readonly property int fontSizeSmall: 12
readonly property int fontSizeMedium: 15
readonly property int fontSizeLarge: 18
readonly property int fontSizeXLarge: 22
readonly property int fontSizeXXLarge: 28
}

2
electrum/gui/qml/components/main.qml

@ -19,6 +19,8 @@ ApplicationWindow
Material.primary: Material.Indigo Material.primary: Material.Indigo
Material.accent: Material.LightBlue Material.accent: Material.LightBlue
property QtObject constants: Constants {}
property alias stack: mainStackView property alias stack: mainStackView
header: ToolBar { header: ToolBar {

Loading…
Cancel
Save