Skip to content
Snippets Groups Projects
Commit 35158bf2 authored by Konstantin's avatar Konstantin
Browse files

[*]Edit fonts

parent 65871128
No related branches found
No related tags found
2 merge requests!11Bugs 2893,!10[+]add dapRadioButton
...@@ -28,18 +28,16 @@ Button { ...@@ -28,18 +28,16 @@ Button {
property string colorButtonTextHover property string colorButtonTextHover
///@detalis indentTextRight: Indentation of the text from the right edge. ///@detalis indentTextRight: Indentation of the text from the right edge.
property int indentTextRight property int indentTextRight
///@detalis fontSizeButton Font size. ///@detalis fontButton Font setting.
property int fontSizeButton property alias fontButton:buttonText.font
///@detalis fontFamily Font family button.
property string fontFamily
///@detalis existenceImage Indicates the presence of an image. ///@detalis existenceImage Indicates the presence of an image.
property bool existenceImage:true property bool existenceImage:true
///@detalis horizontalAligmentText Horizontal alignment. ///@detalis horizontalAligmentText Horizontal alignment.
property alias horizontalAligmentText:templateText.horizontalAlignment property alias horizontalAligmentText:buttonText.horizontalAlignment
///@detalis colorBackgroundButton This property overrides the background color. ///@detalis colorBackgroundButton This property overrides the background color.
property alias colorBackgroundButton: dapBackgroundButton.color property alias colorBackgroundButton: dapBackgroundButton.color
///@detalis colorTextButton This property overrides the color of the text. ///@detalis colorTextButton This property overrides the color of the text.
property alias colorTextButton: templateText.color property alias colorTextButton: buttonText.color
///@detalis borderColorButton Sets the color of the border. ///@detalis borderColorButton Sets the color of the border.
property string borderColorButton property string borderColorButton
///@detalis borderWidthButton Sets the width of the border. ///@detalis borderWidthButton Sets the width of the border.
...@@ -57,14 +55,11 @@ Button { ...@@ -57,14 +55,11 @@ Button {
border.width: borderWidthButton border.width: borderWidthButton
///button text ///button text
Text { Text {
id: templateText id: buttonText
anchors.fill: parent anchors.fill: parent
verticalAlignment: Qt.AlignVCenter verticalAlignment: Qt.AlignVCenter
horizontalAlignment: Qt.AlignRight horizontalAlignment: Qt.AlignRight
anchors.rightMargin: indentTextRight anchors.rightMargin: indentTextRight
font.pixelSize: fontSizeButton
font.family: fontFamily
font.weight: Font.Normal
color: dapButton.hovered ? colorButtonTextHover : colorButtonTextNormal color: dapButton.hovered ? colorButtonTextHover : colorButtonTextNormal
text: qsTr(textButton) text: qsTr(textButton)
} }
......
...@@ -3,8 +3,11 @@ import QtQuick.Controls 2.0 ...@@ -3,8 +3,11 @@ import QtQuick.Controls 2.0
DapComboBoxForm DapComboBoxForm
{ {
id:dapComboBox
delegate:ItemDelegate delegate:ItemDelegate
{ {
width: parent.width width: parent.width
//Adjusting the height of the line, taking into account that the second element from the end may be the last //Adjusting the height of the line, taking into account that the second element from the end may be the last
...@@ -27,8 +30,7 @@ DapComboBoxForm ...@@ -27,8 +30,7 @@ DapComboBoxForm
anchors.fill: parent anchors.fill: parent
anchors.topMargin: paddingTopItemDelegate anchors.topMargin: paddingTopItemDelegate
anchors.leftMargin: popup.visible ? sidePaddingActive : sidePaddingNormal anchors.leftMargin: popup.visible ? sidePaddingActive : sidePaddingNormal
font.family: fontFamily font:dapComboBox.font
font.pixelSize: fontSizeComboBox
text: if(index != currentIndex) text: if(index != currentIndex)
return modelData; return modelData;
else return "" else return ""
......
import QtQuick 2.0 import QtQuick 2.0
import QtQuick.Controls 2.2 import QtQuick.Controls 2.2
import QtQuick.Controls.Styles 1.4 import QtQuick.Controls.Styles 1.4
import QtGraphicalEffects 1.0 import QtGraphicalEffects 1.0
...@@ -20,10 +20,6 @@ ComboBox { ...@@ -20,10 +20,6 @@ ComboBox {
property string normalTopColor property string normalTopColor
///@detalis hilightTopColor Top string color in selected state. ///@detalis hilightTopColor Top string color in selected state.
property string hilightTopColor property string hilightTopColor
///@detalis fontSizeComboBox Font size for the entire widget.
property int fontSizeComboBox
///@detalis fontFamely Font family ComboBox.
property string fontFamily
///@detalis widthPopupComboBoxNormal Width of the combo box in the normal state. ///@detalis widthPopupComboBoxNormal Width of the combo box in the normal state.
property int widthPopupComboBoxNormal property int widthPopupComboBoxNormal
///@detalis widthPopupComboBoxActive Width of the ComboBox in the active state. ///@detalis widthPopupComboBoxActive Width of the ComboBox in the active state.
...@@ -68,7 +64,8 @@ ComboBox { ...@@ -68,7 +64,8 @@ ComboBox {
property string colorTopNormalDropShadow property string colorTopNormalDropShadow
///@detalis colorDropShadow Unboxed shadow color in expanded state. ///@detalis colorDropShadow Unboxed shadow color in expanded state.
property string colorDropShadow property string colorDropShadow
///@detalis fontComboBox Font setting combobox.
property alias fontComboBox:customComboBox.font
id: customComboBox id: customComboBox
width: popup.visible ? widthPopupComboBoxActive : widthPopupComboBoxNormal width: popup.visible ? widthPopupComboBoxActive : widthPopupComboBoxNormal
...@@ -94,11 +91,11 @@ ComboBox { ...@@ -94,11 +91,11 @@ ComboBox {
} }
//Main line text settings //Main line text settings
contentItem: Text { contentItem: Text {
id:textTopComboBox
anchors.fill: parent anchors.fill: parent
anchors.leftMargin: popup.visible ? sidePaddingActive : sidePaddingNormal anchors.leftMargin: popup.visible ? sidePaddingActive : sidePaddingNormal
text: parent.displayText text: parent.displayText
font.family: fontFamily font: parent.font
font.pixelSize: fontSizeComboBox
color: popup.visible ? hilightColorTopText : normalColorTopText color: popup.visible ? hilightColorTopText : normalColorTopText
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter
} }
......
...@@ -5,10 +5,10 @@ RadioButton ...@@ -5,10 +5,10 @@ RadioButton
{ {
///@detalis textButton Text RadioButton. ///@detalis textButton Text RadioButton.
property alias nameRadioButton: nameButton.text property alias nameRadioButton: nameButton.text
///@detalis fontText Font setting.
property alias fontRadioButton:nameButton.font
///@detalis nameTextColor Text color. ///@detalis nameTextColor Text color.
property alias nameTextColor: nameButton.color property alias nameTextColor: nameButton.color
///@detalis nameTextPixelSize Text size(px).
property alias nameTextPixelSize: nameButton.font.pixelSize
///@detalis widthRadioButton Width RadioButton. ///@detalis widthRadioButton Width RadioButton.
property alias widthRadioButton: customRadioButton.implicitWidth property alias widthRadioButton: customRadioButton.implicitWidth
///@detalis heightRadioButton Height RadioButton. ///@detalis heightRadioButton Height RadioButton.
...@@ -28,7 +28,8 @@ RadioButton ...@@ -28,7 +28,8 @@ RadioButton
///@detalis indicatorSize The size of the main circle of the indicator. ///@detalis indicatorSize The size of the main circle of the indicator.
property int indicatorSize property int indicatorSize
///@detalis indicatorInnerSize The size of the inner circle of the indicator. ///@detalis indicatorInnerSize The size of the inner circle of the indicator.
property int indicatorInnerSize property int indicatorInnerSize
id: customRadioButton id: customRadioButton
...@@ -41,8 +42,6 @@ RadioButton ...@@ -41,8 +42,6 @@ RadioButton
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
color: "#3E3853" color: "#3E3853"
font.pixelSize: 16 * pt
font.family: "Roboto"
horizontalAlignment: Text.AlignLeft horizontalAlignment: Text.AlignLeft
text: qsTr("template") text: qsTr("template")
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment