Browse Source

Add logo, tweak colours

master 0.6
nous 2 years ago
parent
commit
7a1455807a
Signed by: nous
GPG Key ID: EA690BC73A4F1094
  1. 89
      artix/Main.qml
  2. BIN
      artix/angle-down.png
  3. 231
      artix/artix-banner.svg
  4. 258
      artix/components/ComboBox.qml
  5. 70
      artix/components/LayoutBox.qml
  6. 5
      artix/components/qmldir
  7. 8
      artix/metadata.desktop
  8. BIN
      artix/preview.png
  9. 2
      artix/theme.conf

89
artix/Main.qml

@ -1,5 +1,7 @@
import QtQuick 2.0
import QtQuick 2.14
import SddmComponents 2.0
import 'components'
Rectangle {
id: container
@ -54,32 +56,40 @@ Rectangle {
id: mainColumn
anchors.centerIn: parent
spacing: 12
Text {
anchors.horizontalCenter: parent.horizontalCenter
color: "black"
verticalAlignment: Text.AlignVCenter
height: text.implicitHeight
Image {
mipmap: true
source: "artix-banner.svg"
width: parent.width
text: textConstants.welcomeText.arg(sddm.hostName)
wrapMode: Text.WordWrap
font.pixelSize: 24
elide: Text.ElideRight
horizontalAlignment: Text.AlignHCenter
fillMode: Image.PreserveAspectFit
}
Text {
anchors.horizontalCenter: parent.horizontalCenter
color: "black"
color: "#cc000000"
verticalAlignment: Text.AlignVCenter
height: text.implicitHeight
width: parent.width
text: qsTr("Artix Lxqt")
text: textConstants.welcomeText.arg(sddm.hostName)
wrapMode: Text.WordWrap
font.pixelSize: 14
font.pixelSize: 24
elide: Text.ElideRight
horizontalAlignment: Text.AlignHCenter
}
// Text {
// anchors.horizontalCenter: parent.horizontalCenter
// color: '#99000000'
// verticalAlignment: Text.AlignVCenter
// height: text.implicitHeight
// width: parent.width
// text: qsTr("Artix Linux")
// wrapMode: Text.WordWrap
// font.pixelSize: 22
// elide: Text.ElideRight
// horizontalAlignment: Text.AlignHCenter
// }
Column {
width: parent.width
spacing: 4
@ -88,7 +98,8 @@ Rectangle {
width: parent.width
text: textConstants.userName
font.bold: true
font.pixelSize: 12
font.pixelSize: 14
color: '#99000000'
}
TextBox {
@ -96,7 +107,9 @@ Rectangle {
width: parent.width; height: 30
text: userModel.lastUser
font.pixelSize: 14
color: '#aa000000'
textColor: '#ddffffff'
focusColor: 'steelblue'
KeyNavigation.backtab: rebootButton; KeyNavigation.tab: password
Keys.onPressed: {
@ -110,19 +123,23 @@ Rectangle {
Column {
width: parent.width
spacing : 4
spacing: 4
Text {
id: lblPassword
width: parent.width
text: textConstants.password
font.bold: true
font.pixelSize: 12
font.pixelSize: 14
color: '#aa000000'
}
PasswordBox {
id: password
width: parent.width; height: 30
font.pixelSize: 14
color: '#aa000000'
textColor: '#ddffffff'
focusColor: 'steelblue'
KeyNavigation.backtab: name; KeyNavigation.tab: session
@ -142,8 +159,8 @@ Rectangle {
Column {
z: 100
width: parent.width * 1.3
spacing : 4
width: parent.width * 1.25
spacing: 4
anchors.bottom: parent.bottom
Text {
@ -152,16 +169,21 @@ Rectangle {
text: textConstants.session
wrapMode: TextEdit.WordWrap
font.bold: true
font.pixelSize: 12
font.pixelSize: 14
color: '#aa000000'
}
ComboBox {
id: session
width: parent.width; height: 30
font.pixelSize: 14
color: '#aa000000'
textColor: '#ddffffff'
menuColor: '#aa000000'
focusColor: 'steelblue'
hoverColor: '#aa006699'
arrowIcon: "angle-down.png"
arrowColor: '#44000000'
model: sessionModel
index: sessionModel.lastIndex
@ -172,7 +194,7 @@ Rectangle {
Column {
z: 101
width: parent.width * 0.7
spacing : 4
spacing: 4
anchors.bottom: parent.bottom
Text {
@ -181,15 +203,18 @@ Rectangle {
text: textConstants.layout
wrapMode: TextEdit.WordWrap
font.bold: true
font.pixelSize: 12
font.pixelSize: 14
color: '#aa000000'
}
LayoutBox {
id: layoutBox
width: parent.width; height: 30
font.pixelSize: 14
color: '#aa000000'
hoverColor: '#aa006699'
menuColor: '#aa006699'
arrowIcon: "angle-down.png"
arrowColor: '#44000000'
KeyNavigation.backtab: session; KeyNavigation.tab: loginButton
}
@ -206,7 +231,9 @@ Rectangle {
id: loginButton
text: textConstants.login
width: parent.btnWidth
color: "#bb003355"
textColor: '#ccededed'
activeColor: '#bb005555'
onClicked: sddm.login(name.text, password.text, session.index)
KeyNavigation.backtab: layoutBox; KeyNavigation.tab: shutdownButton
@ -216,6 +243,9 @@ Rectangle {
id: shutdownButton
text: textConstants.shutdown
width: parent.btnWidth
color: "#bb003355"
textColor: '#ccededed'
activeColor: '#bb005555'
onClicked: sddm.powerOff()
@ -226,6 +256,9 @@ Rectangle {
id: rebootButton
text: textConstants.reboot
width: parent.btnWidth
color: "#bb003355"
textColor: '#ccededed'
activeColor: '#bb005555'
onClicked: sddm.reboot()

BIN
artix/angle-down.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 196 B

After

Width:  |  Height:  |  Size: 3.5 KiB

231
artix/artix-banner.svg

@ -0,0 +1,231 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
sodipodi:docname="banner.svg"
inkscape:version="1.0 (4035a4fb49, 2020-05-01)"
id="svg879"
version="1.1"
viewBox="0 0 138.10243 50.725319"
height="50.725319mm"
width="138.10243mm">
<title
id="title1672">Artix Logo Horizontal ColorFull</title>
<defs
id="defs873">
<linearGradient
gradientUnits="userSpaceOnUse"
y2="143.22675"
x2="81.200447"
y1="145.98615"
x1="75.542618"
id="linearGradient881"
xlink:href="#linearGradient887"
inkscape:collect="always"
gradientTransform="translate(-17.035036,-82.929758)" />
<linearGradient
inkscape:collect="always"
id="linearGradient887">
<stop
style="stop-color:#ffffff;stop-opacity:0.36470589"
offset="0"
id="stop883" />
<stop
style="stop-color:#ffffff;stop-opacity:0"
offset="1"
id="stop885" />
</linearGradient>
<linearGradient
gradientTransform="translate(-56.846252,39.557141)"
gradientUnits="userSpaceOnUse"
y2="30.53084"
x2="80.208908"
y1="15.35424"
x1="105.83431"
id="linearGradient1851-9"
xlink:href="#linearGradient1849"
inkscape:collect="always" />
<linearGradient
id="linearGradient1849"
inkscape:collect="always">
<stop
id="stop1845"
offset="0"
style="stop-color:#000000;stop-opacity:0.10217391" />
<stop
id="stop1847"
offset="1"
style="stop-color:#000000;stop-opacity:0.30434781" />
</linearGradient>
<linearGradient
gradientTransform="translate(-26.863526,25.331281)"
gradientUnits="userSpaceOnUse"
y2="26.894571"
x2="87.0924"
y1="12.29244"
x1="70.724709"
id="linearGradient1851-9-8"
xlink:href="#linearGradient1849"
inkscape:collect="always" />
<linearGradient
gradientTransform="translate(-12.217124,50.763951)"
gradientUnits="userSpaceOnUse"
y2="19.324032"
x2="81.157883"
y1="12.29244"
x1="70.724701"
id="linearGradient1851-9-8-1"
xlink:href="#linearGradient1849"
inkscape:collect="always" />
<linearGradient
y2="56.393845"
x2="55.280762"
y1="62.847496"
x1="70.512688"
gradientTransform="translate(-21.524626,-7.936016)"
gradientUnits="userSpaceOnUse"
id="linearGradient1200-8"
xlink:href="#linearGradient887"
inkscape:collect="always" />
<linearGradient
y2="59.204388"
x2="63.043533"
y1="62.847496"
x1="70.512688"
gradientTransform="matrix(-1,0,0,1,114.37386,-25.223682)"
gradientUnits="userSpaceOnUse"
id="linearGradient1200-5"
xlink:href="#linearGradient887"
inkscape:collect="always" />
</defs>
<sodipodi:namedview
lock-margins="false"
inkscape:window-maximized="1"
inkscape:window-y="0"
inkscape:window-x="0"
inkscape:window-height="1008"
inkscape:window-width="1904"
inkscape:document-rotation="0"
fit-margin-bottom="2"
fit-margin-right="2"
fit-margin-left="2"
fit-margin-top="2"
inkscape:snap-object-midpoints="true"
inkscape:guide-bbox="true"
showguides="true"
inkscape:bbox-paths="false"
inkscape:snap-bbox="true"
inkscape:snap-page="true"
showgrid="false"
inkscape:current-layer="layer1"
inkscape:document-units="mm"
inkscape:cy="113.2675"
inkscape:cx="231.20755"
inkscape:zoom="0.5"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
borderopacity="1.0"
bordercolor="#666666"
pagecolor="#ffffff"
id="base" />
<metadata
id="metadata876">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title>Artix Logo Horizontal ColorFull</dc:title>
<cc:license
rdf:resource="http://creativecommons.org/licenses/by-nc-sa/4.0/" />
</cc:Work>
<cc:License
rdf:about="http://creativecommons.org/licenses/by-nc-sa/4.0/">
<cc:permits
rdf:resource="http://creativecommons.org/ns#Reproduction" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#Distribution" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#Notice" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#Attribution" />
<cc:prohibits
rdf:resource="http://creativecommons.org/ns#CommercialUse" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
</cc:License>
</rdf:RDF>
</metadata>
<g
transform="translate(-21.362659,-21.362661)"
id="layer1"
inkscape:groupmode="layer"
inkscape:label="Layer 1">
<g
id="g36">
<path
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:17.6389px;line-height:1.25;font-family:'Bai Jamjuree';-inkscape-font-specification:'Bai Jamjuree';text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;display:inline;fill:#10a0cc;fill-opacity:1;stroke:none;stroke-width:0.264583"
d="m 129.60272,31.622431 c -0.74835,0 -1.35595,0.23405 -1.82367,0.70177 -0.46772,0.4677 -0.70125,1.07533 -0.70125,1.82366 0,0.74832 0.23357,1.35595 0.70125,1.82366 0.46772,0.46771 1.07532,0.70177 1.82367,0.70177 0.7483,0 1.3575,-0.23408 1.82522,-0.70177 0.46769,-0.46771 0.70176,-1.07534 0.70176,-1.82366 0,-0.74833 -0.23408,-1.35596 -0.70176,-1.82366 -0.46772,-0.46771 -1.07692,-0.70177 -1.82522,-0.70177 z m -18.1839,1.49655 v 18.47846 c 0,2.43206 0.52893,4.17729 1.58906,5.2374 1.0913,1.06013 2.86976,1.59061 5.333,1.59061 h 2.52542 v -2.99362 h -2.52542 c -1.27839,0 -2.19828,-0.2959 -2.75952,-0.88832 -0.53008,-0.59243 -0.88081,-1.57684 -0.79478,-2.94607 v -8.42274 h 6.07972 v -2.99362 h -6.07972 v -7.0621 z m -38.625551,6.68796 v 2.94711 h 8.35453 c 1.34075,0 2.41599,0.42007 3.22668,1.26194 0.81069,0.81068 1.21698,1.87111 1.21698,3.18068 v 0.28371 c -0.77951,-0.53007 -1.71472,-0.95014 -2.80603,-1.26194 -1.09131,-0.31179 -2.15278,-0.46871 -3.18172,-0.46871 h -2.99258 c -2.30733,0 -4.16296,0.59231 -5.56607,1.77716 -1.40311,1.18484 -2.10478,2.75982 -2.10478,4.73976 0,1.97995 0.67102,3.57093 2.01176,4.75578 1.37194,1.18484 3.19483,1.77715 5.47098,1.77715 h 2.80655 c 1.2472,0 2.44869,-0.32759 3.60237,-0.98237 1.18485,-0.65478 2.1354,-1.54401 2.85254,-2.6665 v 3.27474 h 3.18068 v -11.22878 c 0,-2.21379 -0.717,-3.99071 -2.15129,-5.33145 -1.40311,-1.37193 -3.25873,-2.05828 -5.56607,-2.05828 z m 22.92987,0.37414 v 18.24437 h 3.36775 v -8.32818 c 0,-2.08907 0.60764,-3.75817 1.823671,-5.00538 1.24721,-1.27839 2.86876,-1.91719 4.8643,-1.91719 v -2.99362 c -1.37193,0 -2.69656,0.34291 -3.97495,1.02888 -1.24721,0.68596 -2.182421,1.57519 -2.806031,2.6665 v -3.69538 z m 32.197011,0 v 18.24437 h 3.36669 v -18.24437 z m 8.86819,0 8.08837,9.12193 -8.08837,9.12244 h 4.49997 l 5.83788,-6.58513 5.83945,6.58513 h 4.49945 l -8.08788,-9.12244 8.08788,-9.12193 h -4.49945 l -5.83945,6.58513 -5.83788,-6.58513 z m -60.177211,8.51576 h 2.99258 c 1.15367,0 2.27645,0.18654 3.36775,0.56069 1.12249,0.34298 1.99639,0.8106 2.62,1.40302 v 0.23409 c -0.40535,1.49665 -1.1852,2.69814 -2.33888,3.60236 -1.15366,0.90424 -2.46297,1.35548 -3.92844,1.35548 h -2.90112 c -1.2472,0 -2.24373,-0.32655 -2.99206,-0.98134 -0.74832,-0.65479 -1.12241,-1.52877 -1.12241,-2.60449 0,-1.07572 0.38942,-1.93266 1.16892,-2.58744 0.81069,-0.65479 1.85527,-0.98237 3.13366,-0.98237 z"
id="path4885-0"
inkscape:connector-curvature="0"
inkscape:label="Sign" />
<path
inkscape:label="Base"
inkscape:connector-curvature="0"
id="path886"
d="m 46.151449,23.362661 -8.03465,16.47393 22.11235,12.38943 z m -10.46189,21.45089 -12.3269,25.27443 36.57813,-15.11174 z m 26.95598,12.3672 -11.53625,6.62285 17.83147,6.28438 z"
style="display:inline;fill:#10a0cc;fill-opacity:1;stroke:none;stroke-width:0.0999488;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
sodipodi:nodetypes="cccccccccccc" />
<path
inkscape:label="Light"
inkscape:connector-curvature="0"
id="path947"
d="m 58.507579,63.056391 4.13797,-5.87612 6.29521,12.9077 z"
style="fill:url(#linearGradient881);fill-opacity:1;stroke:none;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<path
inkscape:label="Shadow"
sodipodi:nodetypes="cccc"
inkscape:connector-curvature="0"
id="path1434-9-4"
d="m 23.362659,70.087981 25.6254,-15.1766 10.95269,0.065 z"
style="fill:url(#linearGradient1851-9);fill-opacity:1;stroke:none;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<path
inkscape:label="Shadow"
sodipodi:nodetypes="cccc"
inkscape:connector-curvature="0"
id="path1434-9-4-2"
d="m 60.229219,52.225851 -22.11223,-12.38962 5.74419,-2.21251 z"
style="fill:url(#linearGradient1851-9-8);fill-opacity:1;stroke:none;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<path
inkscape:label="Shadow"
sodipodi:nodetypes="cccc"
inkscape:connector-curvature="0"
id="path1434-9-4-2-4"
d="m 68.940759,70.087981 -17.83145,-6.28419 7.39827,-0.7474 z"
style="fill:url(#linearGradient1851-9-8-1);fill-opacity:1;stroke:none;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<path
inkscape:label="Light"
sodipodi:nodetypes="cccc"
inkscape:connector-curvature="0"
id="path1381-5-9"
d="m 23.362659,70.087981 25.6254,-15.1766 -13.29865,-10.09773 z"
style="fill:url(#linearGradient1200-8);fill-opacity:1;stroke:none;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<path
inkscape:label="Light"
sodipodi:nodetypes="cccc"
inkscape:connector-curvature="0"
id="path1381-5-7"
d="m 60.229209,52.225851 -16.36803,-14.60213 2.29027,-14.26106 z"
style="fill:url(#linearGradient1200-5);fill-opacity:1;stroke:none;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 11 KiB

258
artix/components/ComboBox.qml

@ -0,0 +1,258 @@
/***************************************************************************
* Copyright (c) 2013 Abdurrahman AVCI <abdurrahmanavci@gmail.com>
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge,
* publish, distribute, sublicense, and/or sell copies of the Software,
* and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
* OR OTHER DEALINGS IN THE SOFTWARE.
*
***************************************************************************/
import QtQuick 2.0
FocusScope {
id: container
width: 80; height: 30
property color color: "white"
property color borderColor: "#ababab"
property color focusColor: "#266294"
property color hoverColor: "#5692c4"
property color menuColor: "white"
property color textColor: "black"
property int borderWidth: 1
property font font
property alias model: listView.model
property int index: 0
property alias arrowColor: arrow.color
property alias arrowIcon: arrowIcon.source
property Component rowDelegate: defaultRowDelegate
signal valueChanged(int id)
Component {
id: defaultRowDelegate
Text {
anchors.fill: parent
anchors.margins: 3 + container.borderWidth + (LayoutMirroring.enabled ? arrow.width : 0)
verticalAlignment: Text.AlignVCenter
color: container.textColor
font: container.font
text: parent.modelItem.name
}
}
onFocusChanged: if (!container.activeFocus) close(false)
Rectangle {
id: main
anchors.fill: parent
color: container.color
border.color: container.borderColor
border.width: container.borderWidth
Behavior on border.color { ColorAnimation { duration: 100 } }
states: [
State {
name: "hover"; when: mouseArea.containsMouse
PropertyChanges { target: main; border.width: container.borderWidth; border.color: container.hoverColor }
},
State {
name: "focus"; when: container.activeFocus && !mouseArea.containsMouse
PropertyChanges { target: main; border.width: container.borderWidth; border.color: container.focusColor }
}
]
}
Loader {
id: topRow
anchors.fill: parent
focus: true
clip: true
sourceComponent: rowDelegate
property variant modelItem
}
Rectangle {
id: arrow
anchors.right: parent.right
width: 20 + 2*border.width; height: parent.height
border.color: main.border.color
border.width: main.border.width
Image {
id: arrowIcon
anchors.fill: parent
anchors.leftMargin: parent.border.width
anchors.rightMargin: parent.border.width
clip: true
smooth: true
fillMode: Image.PreserveAspectFit
}
}
MouseArea {
id: mouseArea
anchors.fill: container
cursorShape: Qt.PointingHandCursor
hoverEnabled: true
onEntered: if (main.state == "") main.state = "hover";
onExited: if (main.state == "hover") main.state = "";
onClicked: { container.focus = true; toggle() }
onWheel: {
if (wheel.angleDelta.y > 0)
listView.decrementCurrentIndex()
else
listView.incrementCurrentIndex()
}
}
Keys.onPressed: {
if (event.key === Qt.Key_Up) {
listView.decrementCurrentIndex()
} else if (event.key === Qt.Key_Down) {
if (event.modifiers !== Qt.AltModifier)
listView.incrementCurrentIndex()
else
toggle()
} else if (event.key === Qt.Key_Enter || event.key === Qt.Key_Return) {
close(true)
} else if (event.key === Qt.Key_Escape) {
close(false)
}
}
Rectangle {
id: dropDown
width: container.width; height: 0
anchors.top: container.bottom
anchors.topMargin: 0
color: container.menuColor
clip: true
Behavior on height { NumberAnimation { duration: 100 } }
Component {
id: myDelegate
Rectangle {
width: dropDown.width; height: container.height - 2*container.borderWidth
color: "transparent"
Loader {
id: loader
anchors.fill: parent
sourceComponent: rowDelegate
property variant modelItem: model
}
property variant modelItem: model
MouseArea {
id: delegateMouseArea
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
hoverEnabled: true
onEntered: listView.currentIndex = index
onClicked: close(true)
}
}
}
ListView {
id: listView
width: container.width; height: (container.height - 2*container.borderWidth) * count + container.borderWidth
delegate: myDelegate
highlight: Rectangle {
anchors.horizontalCenter: parent ? parent.horizontalCenter : undefined;
color: container.hoverColor
}
}
Rectangle {
anchors.fill: listView
anchors.topMargin: -container.borderWidth
color: "transparent"
clip: false
border.color: main.border.color
border.width: main.border.width
}
states: [
State {
name: "visible";
PropertyChanges { target: dropDown; height: (container.height - 2*container.borderWidth) * listView.count + container.borderWidth}
}
]
}
function toggle() {
if (dropDown.state === "visible")
close(false)
else
open()
}
function open() {
dropDown.state = "visible"
listView.currentIndex = container.index
}
function close(update) {
dropDown.state = ""
if (update) {
container.index = listView.currentIndex
topRow.modelItem = listView.currentItem.modelItem
valueChanged(listView.currentIndex)
}
}
Component.onCompleted: {
listView.currentIndex = container.index
if (listView.currentItem)
topRow.modelItem = listView.currentItem.modelItem
}
onIndexChanged: {
listView.currentIndex = container.index
if (listView.currentItem)
topRow.modelItem = listView.currentItem.modelItem
}
onModelChanged: {
listView.currentIndex = container.index
if (listView.currentItem)
topRow.modelItem = listView.currentItem.modelItem
}
}

70
artix/components/LayoutBox.qml

@ -0,0 +1,70 @@
/***************************************************************************
* Copyright (c) 2013 Nikita Mikhaylov <nslqqq@gmail.com>
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge,
* publish, distribute, sublicense, and/or sell copies of the Software,
* and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
* OR OTHER DEALINGS IN THE SOFTWARE.
*
***************************************************************************/
import QtQuick 2.0
ComboBox {
id: combo
model: keyboard.layouts
index: keyboard.currentLayout
onValueChanged: keyboard.currentLayout = id
Connections {
target: keyboard
onCurrentLayoutChanged: combo.index = keyboard.currentLayout
}
rowDelegate: Rectangle {
color: "transparent"
Image {
id: img
source: "/usr/share/sddm/flags/%1.png".arg(modelItem ? modelItem.modelData.shortName : "zz")
anchors.margins: 4
fillMode: Image.PreserveAspectFit
anchors.left: parent.left
anchors.top: parent.top
anchors.bottom: parent.bottom
}
Text {
anchors.margins: 4
anchors.left: img.right
anchors.top: parent.top
anchors.bottom: parent.bottom
color: '#ddffffff'
verticalAlignment: Text.AlignVCenter
text: modelItem ? modelItem.modelData.shortName : "zz"
font.pixelSize: 14
}
}
}

5
artix/components/qmldir

@ -0,0 +1,5 @@
module SddmComponents
LayoutBox 2.0 LayoutBox.qml
ComboBox 2.0 ComboBox.qml

8
artix/metadata.desktop

@ -1,14 +1,14 @@
[SddmGreeterTheme]
Name=Manjaro
Description=Manjaro SDDM Theme
Name=Artix
Description=Artix SDDM Theme
Author=oberon
Type=sddm-theme
Version=0.1
Website=https://github.com/sddm/sddm
#Screenshot=maldives.jpg
Screenshot=preview.png
#TranslationsDirectory=translations
Email=oberon@manjaro.org
MainScript=Main.qml
ConfigFile=theme.conf
Theme-Id=manjaro
Theme-Id=artix
Theme-API=2.0

BIN
artix/preview.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 772 KiB

2
artix/theme.conf

@ -1,2 +1,2 @@
[General]
background=/usr/share/backgrounds/GradientGlowBlue.jpg
background=/usr/share/backgrounds/Artix_dna_spiral_dark.jpg

Loading…
Cancel
Save