mirror of
https://github.com/Serial-Studio/Serial-Studio.git
synced 2025-01-31 17:42:55 +08:00
Use same mono font in all platforms
This commit is contained in:
parent
47bc62c40a
commit
633a0905ae
@ -29,6 +29,7 @@ TRANSLATIONS += \
|
||||
RESOURCES += \
|
||||
$$PWD/icons/rcc_icons.qrc \
|
||||
$$PWD/images/rcc_images.qrc \
|
||||
$$PWD/fonts/rcc_fonts.qrc \
|
||||
$$PWD/instruments/rcc_instruments.qrc \
|
||||
$$PWD/messages/rcc_messages.qrc \
|
||||
$$PWD/qml/rcc_qml.qrc \
|
||||
|
BIN
assets/fonts/NotoSansMono-Regular.ttf
Normal file
BIN
assets/fonts/NotoSansMono-Regular.ttf
Normal file
Binary file not shown.
5
assets/fonts/rcc_fonts.qrc
Normal file
5
assets/fonts/rcc_fonts.qrc
Normal file
@ -0,0 +1,5 @@
|
||||
<RCC>
|
||||
<qresource prefix="/fonts">
|
||||
<file>NotoSansMono-Regular.ttf</file>
|
||||
</qresource>
|
||||
</RCC>
|
@ -38,16 +38,7 @@ ApplicationWindow {
|
||||
//
|
||||
readonly property int spacing: 8
|
||||
property bool firstValidPacket: false
|
||||
readonly property string monoFont: {
|
||||
switch (Qt.platform.os) {
|
||||
case "osx":
|
||||
return "Monaco"
|
||||
case "windows":
|
||||
return "Consolas"
|
||||
default:
|
||||
return "Noto Sans Mono"
|
||||
}
|
||||
}
|
||||
readonly property string monoFont: qmlMain.monoFont
|
||||
|
||||
//
|
||||
// We use this variable to ask the user if he/she wants to enable/disable
|
||||
|
@ -23,7 +23,13 @@
|
||||
import QtQuick 2.12
|
||||
|
||||
Item {
|
||||
id: root
|
||||
id: qmlMain
|
||||
readonly property string monoFont: fontLoader.name
|
||||
|
||||
FontLoader {
|
||||
id: fontLoader
|
||||
source: "qrc:/fonts/NotoSansMono-Regular.ttf"
|
||||
}
|
||||
|
||||
Loader {
|
||||
asynchronous: true
|
||||
|
@ -38,17 +38,17 @@
|
||||
"datasetTextSecondary":"#666666",
|
||||
"datasetWindowBackground":"#fafafa",
|
||||
"datasetWindowBorder":"#336698",
|
||||
"datagridBackground":"#f4f4f7",
|
||||
"datagridBackground":"#f1f1f1",
|
||||
"ledEnabled":"#0072C3",
|
||||
"ledDisabled":"#686868",
|
||||
"csvHighlight":"#2e895c",
|
||||
"widgetBackground":"#f4f4f7",
|
||||
"widgetBackground":"#f1f1f1",
|
||||
"widgetForegroundPrimary":"#24476a",
|
||||
"widgetForegroundSecondary":"#666666",
|
||||
"widgetIndicator1":"#444444",
|
||||
"widgetIndicator2":"#f94144",
|
||||
"widgetIndicator3":"#90be6d",
|
||||
"widgetAlternativeBackground":"#ededed",
|
||||
"widgetAlternativeBackground":"#fafafa",
|
||||
"widgetControlBackground":"#666666",
|
||||
"gyroSky":"#5c93c5",
|
||||
"gyroText":"#ffffff",
|
||||
|
@ -77,7 +77,7 @@ int ThemeManager::themeId() const
|
||||
* in order to apply changes.
|
||||
*
|
||||
* Unfortunately, an app restart is required because the application
|
||||
* palette must be set before the GUI is initialized.
|
||||
* palette must be set before the GUI is initialized.
|
||||
*/
|
||||
void ThemeManager::setTheme(const int id)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user