Skip to content
Snippets Groups Projects
Commit 64876e9d authored by andrey.daragan's avatar andrey.daragan
Browse files

Merge branch 'features-3034' into 'develop'

Features 3034

See merge request !36
parents 8c68a2ae 105ce279
No related branches found
No related tags found
1 merge request!36Features 3034
import QtQuick 2.0
import QtQml 2.2
Item
{
///@details dapFontPath Project path to the font folder
property string dapFontPath
///@details dapFontNames Array of names of font files (for example roboto_thin.ttf)
property var dapFontNames
///@details dapProjectFonts Array of loaded fonts
property var dapProjectFonts
//Create non-visual items
Instantiator
{
id: fontRepeater
model: dapFontNames.length
FontLoader
{
source: dapFontPath + dapFontNames[index]
}
Component.onCompleted: dapProjectFonts = getFonts(fontRepeater)
}
//To associate dapProjectFonts property with FontLoader objects
function getFonts(fontRepeater)
{
var fonts = [];
for(var i = 0; i < fontRepeater.count; i++)
{
fonts[i] = fontRepeater.objectAt(i)
}
return fonts;
}
}
...@@ -27,5 +27,6 @@ ...@@ -27,5 +27,6 @@
<file>widgets/DapScrollViewHandling.qml</file> <file>widgets/DapScrollViewHandling.qml</file>
<file>widgets/DapMessageBox.qml</file> <file>widgets/DapMessageBox.qml</file>
<file>widgets/DapMessageBoxForm.ui.qml</file> <file>widgets/DapMessageBoxForm.ui.qml</file>
<file>DapFont.qml</file>
</qresource> </qresource>
</RCC> </RCC>
...@@ -30,7 +30,7 @@ Button ...@@ -30,7 +30,7 @@ Button
///@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 fontButton Font setting. ///@detalis fontButton Font setting.
property alias fontButton:buttonText.font property alias fontButton: buttonText.font
///@detalis horizontalAligmentText Horizontal alignment. ///@detalis horizontalAligmentText Horizontal alignment.
property alias horizontalAligmentText:buttonText.horizontalAlignment property alias horizontalAligmentText:buttonText.horizontalAlignment
///@detalis colorBackgroundButton This property overrides the background color. ///@detalis colorBackgroundButton This property overrides the background color.
......
...@@ -149,6 +149,7 @@ DapComboBoxForm ...@@ -149,6 +149,7 @@ DapComboBoxForm
return model.get(rowIndex)[modelRole]; return model.get(rowIndex)[modelRole];
} }
function updateMainRow(fm, cbIndex, cbCurrentIndex, elTextArray, width) function updateMainRow(fm, cbIndex, cbCurrentIndex, elTextArray, width)
{ {
if(cbIndex === cbCurrentIndex) if(cbIndex === cbCurrentIndex)
......
...@@ -10,6 +10,11 @@ Rectangle ...@@ -10,6 +10,11 @@ Rectangle
property alias dapContentText: contentText property alias dapContentText: contentText
property alias dapButtonOk: buttonOk property alias dapButtonOk: buttonOk
///@details fontMessage Font setting.
property font fontMessage
///@details fontButtonText Font setting.
property font fontButtonText
layer.enabled: true layer.enabled: true
layer.effect: layer.effect:
DropShadow DropShadow
...@@ -38,10 +43,7 @@ Rectangle ...@@ -38,10 +43,7 @@ Rectangle
anchors.right: parent.right anchors.right: parent.right
anchors.leftMargin: 30 * pt anchors.leftMargin: 30 * pt
anchors.rightMargin: 30 * pt anchors.rightMargin: 30 * pt
font.pixelSize: 16 * pt font: fontMessage
font.family: "Roboto"
font.styleName: "Normal"
font.weight: Font.Normal
color: "#FFFFFF" color: "#FFFFFF"
} }
} }
...@@ -67,10 +69,7 @@ Rectangle ...@@ -67,10 +69,7 @@ Rectangle
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
anchors.bottom: buttonOk.top anchors.bottom: buttonOk.top
font.pixelSize: 16 * pt font: fontMessage
font.family: "Roboto"
font.styleName: "Normal"
font.weight: Font.Normal
color: "#070023" color: "#070023"
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
} }
...@@ -87,11 +86,9 @@ Rectangle ...@@ -87,11 +86,9 @@ Rectangle
colorBackgroundHover: "#D51F5D" colorBackgroundHover: "#D51F5D"
colorButtonTextNormal: "#FFFFFF" colorButtonTextNormal: "#FFFFFF"
colorButtonTextHover: "#FFFFFF" colorButtonTextHover: "#FFFFFF"
fontButton.pixelSize: 14 * pt fontButton: fontButtonText
borderColorButton: "#FFFFFF" borderColorButton: "#FFFFFF"
borderWidthButton: 0 borderWidthButton: 0
fontButton.family: "Roboto"
fontButton.weight: Font.Normal
horizontalAligmentText:Qt.AlignCenter horizontalAligmentText:Qt.AlignCenter
colorTextButton: "#FFFFFF" colorTextButton: "#FFFFFF"
} }
......
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