Commit 3c9afa3d authored by Ronan Abhamon's avatar Ronan Abhamon

fix(app): fix font size on miscellaneous components

parent dd4b5859
......@@ -347,7 +347,7 @@ Url du serveur non configurée.</translation>
</message>
<message>
<source>codecStatus</source>
<translation>status</translation>
<translation>Status</translation>
</message>
</context>
<context>
......
......@@ -87,7 +87,7 @@ int main (int argc, char *argv[]) {
if (info.suffix() == "ttf") {
QString path = info.absoluteFilePath();
if (path.startsWith(":/assets/fonts/"))
qDebug() << QFontDatabase::addApplicationFont(path);
QFontDatabase::addApplicationFont(path);
}
}
......
......@@ -30,6 +30,7 @@ CheckBox {
verticalAlignment: Text.AlignVCenter
}
font.pointSize: CheckBoxTextStyle.fontSize
hoverEnabled: true
indicator: Rectangle {
......
......@@ -6,6 +6,7 @@ import Common 1.0
// =============================================================================
QtObject {
property int fontSize: 10
property int radius: 3
property int size: 18
......
......@@ -7,160 +7,167 @@ import Linphone 1.0
import App.Styles 1.0
// ============================================================================
// ============================================================================
MenuBar {
id: container
MenuBar {
id: container
// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
property bool hide: false
// --------------------------------------------------------------------------
// Workaround to hide toolbar.
// Use private properties of MenuBar.
__contentItem.height: hide
? 0
: MainWindowMenuBarStyle.height
__contentItem.transform: Scale {
yScale: Number(!hide)
}
// --------------------------------------------------------------------------
style: MenuBarStyle {
background: Rectangle {
color: MainWindowMenuBarStyle.color
Rectangle {
anchors.bottom: parent.bottom
color: MainWindowMenuBarStyle.separator.color
height: MainWindowMenuBarStyle.separator.height
width: parent.width
}
}
menuStyle: MenuStyle {
frame: Item {}
property bool hide: false
itemDelegate {
background: Rectangle {
color: (styleData.selected || styleData.open)
? MainWindowMenuBarStyle.subMenu.color.selected
: MainWindowMenuBarStyle.subMenu.color.normal
}
// --------------------------------------------------------------------------
label: Label {
color: styleData.selected
? MainWindowMenuBarStyle.subMenu.text.color.selected
: MainWindowMenuBarStyle.subMenu.text.color.normal
text: styleData.text
}
// Workaround to hide toolbar.
// Use private properties of MenuBar.
shortcut: Label {
color: styleData.selected
? MainWindowMenuBarStyle.subMenu.text.color.selected
: MainWindowMenuBarStyle.subMenu.text.color.normal
text: styleData.shortcut
}
}
}
itemDelegate: Item {
implicitHeight: menuItem.height + MainWindowMenuBarStyle.separator.spacing
implicitWidth: menuItem.width
Item {
id: menuItem
implicitHeight: text.height + MainWindowMenuBarStyle.menu.text.verticalMargins * 2
implicitWidth: text.width + MainWindowMenuBarStyle.menu.text.horizontalMargins * 2
Text {
id: text
anchors.centerIn: parent
color: styleData.open
? MainWindowMenuBarStyle.menu.text.color.selected
: MainWindowMenuBarStyle.menu.text.color.normal
text: formatMnemonic(styleData.text, styleData.underlineMnemonic)
}
Rectangle {
anchors.bottom: parent.bottom
color: MainWindowMenuBarStyle.menu.indicator.color
visible: styleData.open
height: MainWindowMenuBarStyle.menu.indicator.height
width: parent.width
}
}
}
}
// --------------------------------------------------------------------------
Menu {
title: qsTr('options')
MenuItem {
shortcut: 'Ctrl+P'
text: qsTr('settings')
onTriggered: {
var window = App.getSettingsWindow()
if (window.visibility === Window.Minimized) {
window.visibility = Window.AutomaticVisibility
} else {
window.setVisible(true)
}
}
}
MenuSeparator {}
MenuItem {
shortcut: StandardKey.Quit
text: qsTr('quit')
onTriggered: Qt.quit()
}
}
Menu {
title: qsTr('tools')
MenuItem {
text: qsTr('audioAssistant')
}
MenuSeparator {}
MenuItem {
text: qsTr('importContacts')
}
MenuItem {
text: qsTr('exportContacts')
}
}
Menu {
title: qsTr('help')
MenuItem {
shortcut: StandardKey.HelpContents
text: qsTr('about')
}
MenuSeparator {}
MenuItem {
text: qsTr('checkForUpdates')
}
}
}
__contentItem.height: hide
? 0
: MainWindowMenuBarStyle.height
__contentItem.transform: Scale {
yScale: Number(!hide)
}
// --------------------------------------------------------------------------
style: MenuBarStyle {
background: Rectangle {
color: MainWindowMenuBarStyle.color
Rectangle {
anchors.bottom: parent.bottom
color: MainWindowMenuBarStyle.separator.color
height: MainWindowMenuBarStyle.separator.height
width: parent.width
}
}
menuStyle: MenuStyle {
id: menuStyle
font.pointSize: MainWindowMenuBarStyle.subMenu.text.fontSize
frame: Item {}
itemDelegate {
background: Rectangle {
color: (styleData.selected || styleData.open)
? MainWindowMenuBarStyle.subMenu.color.selected
: MainWindowMenuBarStyle.subMenu.color.normal
}
label: Label {
color: styleData.selected
? MainWindowMenuBarStyle.subMenu.text.color.selected
: MainWindowMenuBarStyle.subMenu.text.color.normal
font: menuStyle.font
text: styleData.text
}
shortcut: Label {
color: styleData.selected
? MainWindowMenuBarStyle.subMenu.text.color.selected
: MainWindowMenuBarStyle.subMenu.text.color.normal
font: menuStyle.font
text: styleData.shortcut
}
}
}
itemDelegate: Item {
implicitHeight: menuItem.height + MainWindowMenuBarStyle.separator.spacing
implicitWidth: menuItem.width
Item {
id: menuItem
implicitHeight: text.height + MainWindowMenuBarStyle.menu.text.verticalMargins * 2
implicitWidth: text.width + MainWindowMenuBarStyle.menu.text.horizontalMargins * 2
Text {
id: text
anchors.centerIn: parent
color: styleData.open
? MainWindowMenuBarStyle.menu.text.color.selected
: MainWindowMenuBarStyle.menu.text.color.normal
font.pointSize: MainWindowMenuBarStyle.menu.text.fontSize
text: formatMnemonic(styleData.text, styleData.underlineMnemonic)
}
Rectangle {
anchors.bottom: parent.bottom
color: MainWindowMenuBarStyle.menu.indicator.color
visible: styleData.open
height: MainWindowMenuBarStyle.menu.indicator.height
width: parent.width
}
}
}
}
// --------------------------------------------------------------------------
Menu {
title: qsTr('options')
MenuItem {
shortcut: 'Ctrl+P'
text: qsTr('settings')
onTriggered: {
var window = App.getSettingsWindow()
if (window.visibility === Window.Minimized) {
window.visibility = Window.AutomaticVisibility
} else {
window.setVisible(true)
}
}
}
MenuSeparator {}
MenuItem {
shortcut: StandardKey.Quit
text: qsTr('quit')
onTriggered: Qt.quit()
}
}
Menu {
title: qsTr('tools')
MenuItem {
text: qsTr('audioAssistant')
}
MenuSeparator {}
MenuItem {
text: qsTr('importContacts')
}
MenuItem {
text: qsTr('exportContacts')
}
}
Menu {
title: qsTr('help')
MenuItem {
shortcut: StandardKey.HelpContents
text: qsTr('about')
}
MenuSeparator {}
MenuItem {
text: qsTr('checkForUpdates')
}
}
}
......@@ -20,7 +20,7 @@ QtObject {
property QtObject description: QtObject {
property color color: Colors.g
property int fontSize: 10
property int fontSize: 11
}
property QtObject title: QtObject {
......
......@@ -48,7 +48,7 @@ QtObject {
property QtObject username: QtObject {
property color color: Colors.j
property int fontSize: 9
property int fontSize: 10
property int width: 220
}
}
......
......@@ -11,6 +11,7 @@ QtObject {
property QtObject menu: QtObject {
property QtObject text: QtObject {
property int fontSize: 10
property int horizontalMargins: 9
property int verticalMargins: 4
......@@ -39,6 +40,8 @@ QtObject {
}
property QtObject text: QtObject {
property int fontSize: 10
property QtObject color: QtObject {
property color selected: Colors.k
property color normal: Colors.b
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment