Cleanup sidebar + resize ContentView to correspond
This commit is contained in:
@@ -8,7 +8,7 @@ TabView {
|
|||||||
property bool viewSelected: false
|
property bool viewSelected: false
|
||||||
property int xSelect: 0
|
property int xSelect: 0
|
||||||
property int ySelect: 0
|
property int ySelect: 0
|
||||||
width: parent.width * 0.7
|
width: parent.width * 0.8
|
||||||
height: parent.height
|
height: parent.height
|
||||||
|
|
||||||
property var maxElements: providers.length
|
property var maxElements: providers.length
|
||||||
|
|||||||
@@ -3,24 +3,24 @@ import QtQuick 2.12
|
|||||||
import Ikinuki.Client 1.0
|
import Ikinuki.Client 1.0
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
id: rect
|
||||||
property var providers
|
property var providers
|
||||||
default property int selectedElement: 0
|
property int selectedElement: 0
|
||||||
property var max_elements: providers.length
|
property var max_elements: providers.length
|
||||||
width: parent.width * 0.3
|
width: parent.width * 0.2
|
||||||
height: parent.height
|
height: parent.height
|
||||||
color: "#22282A"
|
color: "#22282A"
|
||||||
Column {
|
Column {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
// header
|
|
||||||
SidebarHeader {}
|
SidebarHeader {}
|
||||||
Repeater {
|
Repeater {
|
||||||
|
id: sidebarElements
|
||||||
model: providers
|
model: providers
|
||||||
SidebarElement {
|
SidebarElement {
|
||||||
name: modelData.name
|
name: modelData.name
|
||||||
selected: (index == selectedElement) ? true : false
|
selected: (index == selectedElement) ? true : false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
function mod(n, m) {
|
function mod(n, m) {
|
||||||
return ((n % m) + m) % m;
|
return ((n % m) + m) % m;
|
||||||
|
|||||||
@@ -1,17 +1,29 @@
|
|||||||
import QtQuick 2.12
|
import QtQuick 2.12
|
||||||
|
|
||||||
Rectangle {
|
Item {
|
||||||
property string name
|
property string name
|
||||||
default property bool selected: false
|
property bool selected: false
|
||||||
color: selected ? "#E4A10D" : "#22282A"
|
|
||||||
width: parent.width
|
width: parent.width * 0.9
|
||||||
height: parent.height * 0.08
|
height: parent.height * 0.08
|
||||||
|
anchors.right: parent.right
|
||||||
|
Rectangle {
|
||||||
|
color: "white"
|
||||||
|
anchors.fill: parent
|
||||||
|
visible: selected ? true : false
|
||||||
|
radius: 10
|
||||||
|
}
|
||||||
Row {
|
Row {
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.fill: parent
|
||||||
|
Item {
|
||||||
|
height: parent.height
|
||||||
|
width: parent.width * 0.02
|
||||||
|
}
|
||||||
Text {
|
Text {
|
||||||
font.pointSize: 15
|
font.pointSize: 15
|
||||||
text: name
|
text: name
|
||||||
color: selected ? "white" : "black"
|
color: selected ? "black" : "white"
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user