Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1561 from KomodoPlatform/dex_new_design
Implement new dex view design
- Loading branch information
Showing
46 changed files
with
1,950 additions
and
2,298 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
import QtQuick 2.15 | ||
import QtQuick.Layouts 1.12 | ||
|
||
import Qaterial 1.0 as Qaterial | ||
|
||
import App 1.0 | ||
import Dex.Themes 1.0 as Dex | ||
|
||
Item | ||
{ | ||
id: control | ||
|
||
property alias text: _label.text | ||
property alias iconSource: _icon.source | ||
property var target | ||
|
||
width: parent.width | ||
height: row.height | ||
|
||
RowLayout | ||
{ | ||
id: row | ||
width: parent.width - 20 | ||
spacing: 10 | ||
|
||
Qaterial.ColorIcon | ||
{ | ||
id: _icon | ||
Layout.alignment: Qt.AlignVCenter | ||
source: target.visible ? Qaterial.Icons.eyeOutline : Qaterial.Icons.eyeOffOutline | ||
color: target.visible ? Dex.CurrentTheme.foregroundColor : Dex.CurrentTheme.buttonTextDisabledColor | ||
iconSize: 17 | ||
} | ||
|
||
DefaultText | ||
{ | ||
id: _label | ||
font.pixelSize: 15 | ||
text: "" | ||
color: target.visible ? Dex.CurrentTheme.foregroundColor : Dex.CurrentTheme.buttonTextDisabledColor | ||
Layout.fillWidth: true | ||
Layout.alignment: Qt.AlignVCenter | ||
} | ||
} | ||
|
||
DefaultMouseArea | ||
{ | ||
anchors.fill: parent | ||
onClicked: | ||
{ | ||
if (target.visible) target.visible = false | ||
else target.visible = true | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
import QtQuick 2.15 | ||
import QtQuick.Controls 2.15 | ||
import QtQuick.Layouts 1.12 | ||
|
||
import Qaterial 1.0 as Qaterial | ||
|
||
import Dex.Themes 1.0 as Dex | ||
import "../Constants" | ||
|
||
Item | ||
{ | ||
id: root | ||
|
||
property string title: "Widget" | ||
|
||
property bool collapsable: true | ||
property bool collapsedAtConstruction: false | ||
|
||
property alias header: headerLoader.sourceComponent | ||
property alias background: backgroundLoader.sourceComponent | ||
|
||
property int margins: 10 | ||
property int spacing: 10 | ||
property int contentSpacing: 10 | ||
|
||
default property alias contentData: content.data | ||
|
||
property bool _collapsed: collapsable && collapsedAtConstruction | ||
|
||
function isCollapsed() { return _collapsed } | ||
|
||
// Background | ||
Loader | ||
{ | ||
id: backgroundLoader | ||
anchors.fill: parent | ||
sourceComponent: defaultBackground | ||
} | ||
|
||
Column | ||
{ | ||
anchors.fill: parent | ||
anchors.margins: root.margins | ||
|
||
spacing: root.spacing | ||
|
||
// Header | ||
Loader | ||
{ | ||
id: headerLoader | ||
sourceComponent: defaultHeader | ||
width: parent.width | ||
} | ||
|
||
// Content | ||
ColumnLayout | ||
{ | ||
id: content | ||
|
||
visible: !root._collapsed | ||
|
||
width: parent.width | ||
height: parent.height - y | ||
|
||
spacing: root.contentSpacing | ||
} | ||
} | ||
|
||
// Header Component | ||
Component | ||
{ | ||
id: defaultHeader | ||
|
||
RowLayout | ||
{ | ||
DefaultText { text: root.title; font: DexTypo.subtitle1 } | ||
Item { Layout.fillWidth: true } | ||
Qaterial.Icon | ||
{ | ||
visible: root.collapsable | ||
width: 20 | ||
height: 20 | ||
color: collapseButMouseArea.containsMouse ? Dex.CurrentTheme.foregroundColor2 : Dex.CurrentTheme.foregroundColor | ||
icon: root._collapsed ? Qaterial.Icons.chevronUp : Qaterial.Icons.chevronDown | ||
|
||
DefaultMouseArea | ||
{ | ||
id: collapseButMouseArea | ||
anchors.fill: parent | ||
hoverEnabled: true | ||
onClicked: root._collapsed = !root._collapsed | ||
} | ||
} | ||
} | ||
} | ||
|
||
// Background Component | ||
Component | ||
{ | ||
id: defaultBackground | ||
|
||
Rectangle | ||
{ | ||
radius: 10 | ||
color: Dex.CurrentTheme.floatingBackgroundColor | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.