Reduce font size in graphs
This commit is contained in:
parent
180e374d71
commit
a837aecb06
@ -108,7 +108,6 @@ Item {
|
|||||||
text: root.stateType.type.toLowerCase() === "bool"
|
text: root.stateType.type.toLowerCase() === "bool"
|
||||||
? root.stateType.displayName
|
? root.stateType.displayName
|
||||||
: 1.0 * Math.round(Types.toUiValue(root.valueState.value, root.stateType.unit) * Math.pow(10, root.roundTo)) / Math.pow(10, root.roundTo) + " " + Types.toUiUnit(root.stateType.unit)
|
: 1.0 * Math.round(Types.toUiValue(root.valueState.value, root.stateType.unit) * Math.pow(10, root.roundTo)) / Math.pow(10, root.roundTo) + " " + Types.toUiUnit(root.stateType.unit)
|
||||||
font.pixelSize: app.largeFont
|
|
||||||
}
|
}
|
||||||
HeaderButton {
|
HeaderButton {
|
||||||
imageSource: "../images/zoom-out.svg"
|
imageSource: "../images/zoom-out.svg"
|
||||||
@ -139,7 +138,7 @@ Item {
|
|||||||
min: Math.floor(logsModelNg.minValue - Math.abs(logsModelNg.minValue * .05))
|
min: Math.floor(logsModelNg.minValue - Math.abs(logsModelNg.minValue * .05))
|
||||||
// onMinChanged: applyNiceNumbers();
|
// onMinChanged: applyNiceNumbers();
|
||||||
// onMaxChanged: applyNiceNumbers();
|
// onMaxChanged: applyNiceNumbers();
|
||||||
labelsFont: Style.smallFont
|
labelsFont: Style.extraSmallFont
|
||||||
labelFormat: {
|
labelFormat: {
|
||||||
if (root.stateType && root.stateType.type.toLowerCase() == "bool") {
|
if (root.stateType && root.stateType.type.toLowerCase() == "bool") {
|
||||||
return "x";
|
return "x";
|
||||||
@ -165,7 +164,7 @@ Item {
|
|||||||
gridVisible: false
|
gridVisible: false
|
||||||
color: Qt.rgba(Style.foregroundColor.r, Style.foregroundColor.g, Style.foregroundColor.b, .2)
|
color: Qt.rgba(Style.foregroundColor.r, Style.foregroundColor.g, Style.foregroundColor.b, .2)
|
||||||
tickCount: chartView.width / 70
|
tickCount: chartView.width / 70
|
||||||
labelsFont: Style.smallFont
|
labelsFont: Style.extraSmallFont
|
||||||
labelsColor: Style.foregroundColor
|
labelsColor: Style.foregroundColor
|
||||||
property int timeDiff: (xAxis.max.getTime() - xAxis.min.getTime()) / 1000
|
property int timeDiff: (xAxis.max.getTime() - xAxis.min.getTime()) / 1000
|
||||||
|
|
||||||
|
|||||||
@ -109,7 +109,7 @@ MainViewBase {
|
|||||||
Layout.columnSpan: energyGrid.columns
|
Layout.columnSpan: energyGrid.columns
|
||||||
Layout.preferredHeight: width * .7
|
Layout.preferredHeight: width * .7
|
||||||
legend.alignment: Qt.AlignBottom
|
legend.alignment: Qt.AlignBottom
|
||||||
legend.font.pixelSize: app.smallFont
|
legend.font: Style.extraSmallFont
|
||||||
// legend.visible: false
|
// legend.visible: false
|
||||||
legend.labelColor: Style.foregroundColor
|
legend.labelColor: Style.foregroundColor
|
||||||
backgroundColor: Style.tileBackgroundColor
|
backgroundColor: Style.tileBackgroundColor
|
||||||
@ -286,7 +286,7 @@ MainViewBase {
|
|||||||
// This seems to crash occationally
|
// This seems to crash occationally
|
||||||
// onMinChanged: applyNiceNumbers();
|
// onMinChanged: applyNiceNumbers();
|
||||||
// onMaxChanged: applyNiceNumbers();
|
// onMaxChanged: applyNiceNumbers();
|
||||||
labelsFont.pixelSize: app.smallFont
|
labelsFont: Style.extraSmallFont
|
||||||
labelFormat: "%d"
|
labelFormat: "%d"
|
||||||
labelsColor: Style.foregroundColor
|
labelsColor: Style.foregroundColor
|
||||||
color: Qt.rgba(Style.foregroundColor.r, Style.foregroundColor.g, Style.foregroundColor.b, .2)
|
color: Qt.rgba(Style.foregroundColor.r, Style.foregroundColor.g, Style.foregroundColor.b, .2)
|
||||||
@ -298,7 +298,7 @@ MainViewBase {
|
|||||||
gridVisible: false
|
gridVisible: false
|
||||||
color: Qt.rgba(Style.foregroundColor.r, Style.foregroundColor.g, Style.foregroundColor.b, .2)
|
color: Qt.rgba(Style.foregroundColor.r, Style.foregroundColor.g, Style.foregroundColor.b, .2)
|
||||||
tickCount: chartView.width / 70
|
tickCount: chartView.width / 70
|
||||||
labelsFont.pixelSize: app.smallFont
|
labelsFont: Style.extraSmallFont
|
||||||
labelsColor: Style.foregroundColor
|
labelsColor: Style.foregroundColor
|
||||||
property int timeDiff: (xAxis.max.getTime() - xAxis.min.getTime()) / 1000
|
property int timeDiff: (xAxis.max.getTime() - xAxis.min.getTime()) / 1000
|
||||||
|
|
||||||
|
|||||||
@ -5,6 +5,9 @@ Item {
|
|||||||
id: root
|
id: root
|
||||||
|
|
||||||
property Thing thing: null
|
property Thing thing: null
|
||||||
|
|
||||||
|
// either or
|
||||||
|
property string stateName: ""
|
||||||
property StateType stateType: null
|
property StateType stateType: null
|
||||||
|
|
||||||
readonly property var pendingValue: d.queuedValue || d.pendingValue
|
readonly property var pendingValue: d.queuedValue || d.pendingValue
|
||||||
@ -16,9 +19,10 @@ Item {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
d.pendingValue = value;
|
d.pendingValue = value;
|
||||||
d.pendingCommand = root.thing.executeAction(root.stateType.name,
|
var stateName = root.stateType == null ? root.stateName : root.stateType.name
|
||||||
|
d.pendingCommand = root.thing.executeAction(stateName,
|
||||||
[{
|
[{
|
||||||
paramName: root.stateType.name,
|
paramName: stateName,
|
||||||
value: value
|
value: value
|
||||||
}])
|
}])
|
||||||
d.queuedValue = null
|
d.queuedValue = null
|
||||||
|
|||||||
Reference in New Issue
Block a user