Skip to content

Commit

Permalink
Use LayerCalculator object
Browse files Browse the repository at this point in the history
  • Loading branch information
vicr123 committed May 29, 2024
1 parent 70f780f commit aa7bdc1
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 26 deletions.
7 changes: 6 additions & 1 deletion application/settings/GeneralSettings.qml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ import com.vicr123.Contemporary
import Contemporary

Item {
LayerCalculator {
id: layer2
layer: 2
}

Grandstand {
id: grandstand
anchors.top: parent.top
Expand All @@ -14,7 +19,7 @@ Item {
innerTopMargin: SafeZone.top

text: qsTr("General")
color: Contemporary.calculateLayer(2).value
color: layer2.color
}


Expand Down
14 changes: 12 additions & 2 deletions application/settings/RootProfileSettings.qml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,16 @@ Item {

signal openProfileSettings(string profile);

LayerCalculator {
id: layer1
layer: 1
}

LayerCalculator {
id: layer2
layer: 2
}

Grandstand {
id: grandstand
anchors.top: parent.top
Expand All @@ -18,7 +28,7 @@ Item {
innerTopMargin: SafeZone.top

text: qsTr("Profiles")
color: Contemporary.calculateLayer(2).value
color: layer2.color
z: 10
}

Expand Down Expand Up @@ -54,7 +64,7 @@ Item {
implicitWidth: 600
implicitHeight: childrenRect.height + 9 + 9

color: Contemporary.calculateLayer(1).value
color: layer1.color

ColumnLayout {
anchors.top: parent.top
Expand Down
7 changes: 6 additions & 1 deletion application/settings/SingleProfileSettings.qml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ Item {
required property string profileUuid;
readonly property var stackView: StackView.view

LayerCalculator {
id: layer2
layer: 2
}

TerminalProfile {
id: profile
zoom: 1
Expand All @@ -35,7 +40,7 @@ Item {
innerTopMargin: SafeZone.top

text: profile.profileName
color: Contemporary.calculateLayer(2).value
color: layer2.color
backButtonVisible: true

onBackButtonClicked: root.stackView.pop()
Expand Down
44 changes: 22 additions & 22 deletions application/translations/en_US.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@
<context>
<name>GeneralSettings</name>
<message>
<location filename="../settings/GeneralSettings.qml" line="16"/>
<location filename="../../../build-theterminal-Desktop_ARM-Debug/application/com/vicr123/theterminal/settings/GeneralSettings.qml" line="16"/>
<location filename="../settings/GeneralSettings.qml" line="21"/>
<location filename="../../../build-theterminal-Desktop_ARM-Debug/application/com/vicr123/theterminal/settings/GeneralSettings.qml" line="21"/>
<source>General</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../settings/GeneralSettings.qml" line="41"/>
<location filename="../../../build-theterminal-Desktop_ARM-Debug/application/com/vicr123/theterminal/settings/GeneralSettings.qml" line="41"/>
<location filename="../settings/GeneralSettings.qml" line="46"/>
<location filename="../../../build-theterminal-Desktop_ARM-Debug/application/com/vicr123/theterminal/settings/GeneralSettings.qml" line="46"/>
<source>Startup</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../settings/GeneralSettings.qml" line="51"/>
<location filename="../../../build-theterminal-Desktop_ARM-Debug/application/com/vicr123/theterminal/settings/GeneralSettings.qml" line="51"/>
<location filename="../settings/GeneralSettings.qml" line="56"/>
<location filename="../../../build-theterminal-Desktop_ARM-Debug/application/com/vicr123/theterminal/settings/GeneralSettings.qml" line="56"/>
<source>Default Profile</source>
<translation type="unfinished"></translation>
</message>
Expand Down Expand Up @@ -140,14 +140,14 @@
<context>
<name>RootProfileSettings</name>
<message>
<location filename="../settings/RootProfileSettings.qml" line="20"/>
<location filename="../../../build-theterminal-Desktop_ARM-Debug/application/com/vicr123/theterminal/settings/RootProfileSettings.qml" line="20"/>
<location filename="../settings/RootProfileSettings.qml" line="30"/>
<location filename="../../../build-theterminal-Desktop_ARM-Debug/application/com/vicr123/theterminal/settings/RootProfileSettings.qml" line="30"/>
<source>Profiles</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../settings/RootProfileSettings.qml" line="77"/>
<location filename="../../../build-theterminal-Desktop_ARM-Debug/application/com/vicr123/theterminal/settings/RootProfileSettings.qml" line="77"/>
<location filename="../settings/RootProfileSettings.qml" line="87"/>
<location filename="../../../build-theterminal-Desktop_ARM-Debug/application/com/vicr123/theterminal/settings/RootProfileSettings.qml" line="87"/>
<source>Edit Profile</source>
<translation type="unfinished"></translation>
</message>
Expand Down Expand Up @@ -176,38 +176,38 @@
<context>
<name>SingleProfileSettings</name>
<message>
<location filename="../settings/SingleProfileSettings.qml" line="64"/>
<location filename="../../../build-theterminal-Desktop_ARM-Debug/application/com/vicr123/theterminal/settings/SingleProfileSettings.qml" line="64"/>
<location filename="../settings/SingleProfileSettings.qml" line="69"/>
<location filename="../../../build-theterminal-Desktop_ARM-Debug/application/com/vicr123/theterminal/settings/SingleProfileSettings.qml" line="69"/>
<source>Shell</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../settings/SingleProfileSettings.qml" line="71"/>
<location filename="../../../build-theterminal-Desktop_ARM-Debug/application/com/vicr123/theterminal/settings/SingleProfileSettings.qml" line="71"/>
<location filename="../settings/SingleProfileSettings.qml" line="76"/>
<location filename="../../../build-theterminal-Desktop_ARM-Debug/application/com/vicr123/theterminal/settings/SingleProfileSettings.qml" line="76"/>
<source>Set the shell that is used when you start a terminal with this profile</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../settings/SingleProfileSettings.qml" line="90"/>
<location filename="../../../build-theterminal-Desktop_ARM-Debug/application/com/vicr123/theterminal/settings/SingleProfileSettings.qml" line="90"/>
<location filename="../settings/SingleProfileSettings.qml" line="95"/>
<location filename="../../../build-theterminal-Desktop_ARM-Debug/application/com/vicr123/theterminal/settings/SingleProfileSettings.qml" line="95"/>
<source>Text</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../settings/SingleProfileSettings.qml" line="99"/>
<location filename="../../../build-theterminal-Desktop_ARM-Debug/application/com/vicr123/theterminal/settings/SingleProfileSettings.qml" line="99"/>
<location filename="../settings/SingleProfileSettings.qml" line="104"/>
<location filename="../../../build-theterminal-Desktop_ARM-Debug/application/com/vicr123/theterminal/settings/SingleProfileSettings.qml" line="104"/>
<source>Font</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../settings/SingleProfileSettings.qml" line="138"/>
<location filename="../../../build-theterminal-Desktop_ARM-Debug/application/com/vicr123/theterminal/settings/SingleProfileSettings.qml" line="138"/>
<location filename="../settings/SingleProfileSettings.qml" line="143"/>
<location filename="../../../build-theterminal-Desktop_ARM-Debug/application/com/vicr123/theterminal/settings/SingleProfileSettings.qml" line="143"/>
<source>Colours</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../settings/SingleProfileSettings.qml" line="147"/>
<location filename="../../../build-theterminal-Desktop_ARM-Debug/application/com/vicr123/theterminal/settings/SingleProfileSettings.qml" line="147"/>
<location filename="../settings/SingleProfileSettings.qml" line="152"/>
<location filename="../../../build-theterminal-Desktop_ARM-Debug/application/com/vicr123/theterminal/settings/SingleProfileSettings.qml" line="152"/>
<source>Theme</source>
<translation type="unfinished"></translation>
</message>
Expand Down

0 comments on commit aa7bdc1

Please sign in to comment.