mirror of
https://github.com/Serial-Studio/Serial-Studio.git
synced 2025-01-31 17:42:55 +08:00
Minor improvements to frameless window layout
This commit is contained in:
parent
f805fcfae0
commit
287f04e6e7
@ -132,7 +132,7 @@
|
||||
<file>qml/Windows/JsonEditor.qml</file>
|
||||
<file>qml/Windows/MainWindow.qml</file>
|
||||
<file>qml/main.qml</file>
|
||||
<file>themes/1_Classic.json</file>
|
||||
<file>themes/2_Classic.json</file>
|
||||
<file>touchbar/console.png</file>
|
||||
<file>touchbar/dashboard.png</file>
|
||||
<file>touchbar/setup.png</file>
|
||||
@ -162,7 +162,7 @@
|
||||
<file>window-border/restore.svg</file>
|
||||
<file>window-border/unmaximize.svg</file>
|
||||
<file>qml/Windows/MQTTConfiguration.qml</file>
|
||||
<file>themes/2_NXG.json</file>
|
||||
<file>themes/1_NXG.json</file>
|
||||
<file>themes/3_Noir.json</file>
|
||||
<file>themes/4_MathWorks.json</file>
|
||||
</qresource>
|
||||
|
@ -81,13 +81,13 @@ Rectangle {
|
||||
|
||||
// Calculations for Windows/Linux layout
|
||||
else {
|
||||
margin = 10
|
||||
margin = 8
|
||||
|
||||
if (root.showIcon)
|
||||
margin += 24
|
||||
|
||||
if (margin > 10)
|
||||
margin += 8
|
||||
if (margin > 8)
|
||||
margin += 6
|
||||
}
|
||||
|
||||
// Return result
|
||||
@ -272,7 +272,7 @@ Rectangle {
|
||||
anchors.fill: parent
|
||||
|
||||
Item {
|
||||
width: 12
|
||||
width: 8
|
||||
}
|
||||
|
||||
WindowButton {
|
||||
|
@ -20,7 +20,7 @@
|
||||
"placeholderText":"#666666",
|
||||
"toolbarGradient1":"#4e5458",
|
||||
"toolbarGradient2":"#4e5458",
|
||||
"menubarText":"#000000",
|
||||
"menubarText":"#ffffff",
|
||||
"dialogBackground":"#f2f2f2",
|
||||
"consoleText":"#424242",
|
||||
"consoleBase":"#f2f2f2",
|
@ -73,34 +73,34 @@ JFI_Object JFI_CreateNew(const quint64 n, const QDateTime &t, const QJsonDocumen
|
||||
}
|
||||
|
||||
/**
|
||||
* Obtains the value of the first element that corresponds to given @a key
|
||||
* Obtains the value of the element that corresponds to given @a key
|
||||
*/
|
||||
QJsonValue JFI_Value(const QJsonObject &object, const QString key)
|
||||
QJsonValue JFI_Value(const QJsonObject &obj, const QString &key)
|
||||
{
|
||||
if (object.contains(key))
|
||||
return object.value(key);
|
||||
if (obj.contains(key))
|
||||
return obj.value(key);
|
||||
|
||||
return QJsonValue();
|
||||
return QJsonValue(QJsonValue::Null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Obtains the value of the first element that matches one of the given @a keys
|
||||
*/
|
||||
QJsonValue JFI_Value(const QJsonObject &object, const StringList keys)
|
||||
QJsonValue JFI_Value(const QJsonObject &obj, const QStringList &keys)
|
||||
{
|
||||
foreach (auto key, keys)
|
||||
{
|
||||
if (object.contains(key))
|
||||
return object.value(key);
|
||||
if (obj.contains(key))
|
||||
return obj.value(key);
|
||||
}
|
||||
|
||||
return QJsonValue();
|
||||
return QJsonValue(QJsonValue::Null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Obtains the value of the first element that corresponds to key @c a or key @c b
|
||||
*/
|
||||
QJsonValue JFI_Value(const QJsonObject &object, const QString a, const QString b)
|
||||
QJsonValue JFI_Value(const QJsonObject &obj, const QString &a, const QString &b)
|
||||
{
|
||||
return JFI_Value(object, StringList { a, b });
|
||||
return JFI_Value(obj, StringList { a, b });
|
||||
}
|
||||
|
@ -44,6 +44,6 @@ extern JFI_Object JFI_Empty(const quint64 n = 0);
|
||||
extern JFI_Object JFI_CreateNew(const quint64 n, const QDateTime &t,
|
||||
const QJsonDocument &d);
|
||||
|
||||
extern QJsonValue JFI_Value(const QJsonObject &object, const QString key);
|
||||
extern QJsonValue JFI_Value(const QJsonObject &object, const StringList keys);
|
||||
extern QJsonValue JFI_Value(const QJsonObject &object, const QString a, const QString b);
|
||||
extern QJsonValue JFI_Value(const QJsonObject &obj, const QString &key);
|
||||
extern QJsonValue JFI_Value(const QJsonObject &obj, const StringList &keys);
|
||||
extern QJsonValue JFI_Value(const QJsonObject &obj, const QString &a, const QString &b);
|
||||
|
Loading…
x
Reference in New Issue
Block a user