mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2025-07-02 16:15:28 +08:00
update
This commit is contained in:
@ -54,6 +54,10 @@ FluWindow {
|
||||
text:"Rectangle"
|
||||
page:"qrc:/T_Rectangle.qml"
|
||||
}
|
||||
ListElement{
|
||||
text:"Theme"
|
||||
page:"qrc:/T_Theme.qml"
|
||||
}
|
||||
ListElement{
|
||||
text:"Awesome"
|
||||
page:"qrc:/T_Awesome.qml"
|
||||
|
46
example/T_Theme.qml
Normal file
46
example/T_Theme.qml
Normal file
@ -0,0 +1,46 @@
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Layouts 1.15
|
||||
import QtQuick.Window 2.15
|
||||
import QtGraphicalEffects 1.15
|
||||
import FluentUI 1.0
|
||||
|
||||
Item {
|
||||
|
||||
ColumnLayout{
|
||||
spacing: 5
|
||||
|
||||
FluText{
|
||||
text:"Theme"
|
||||
fontStyle: FluText.TitleLarge
|
||||
}
|
||||
RowLayout{
|
||||
Layout.topMargin: 20
|
||||
|
||||
|
||||
Repeater{
|
||||
model: [FluColors._Yellow,FluColors._Orange,FluColors._Red,FluColors._Magenta,FluColors._Purple,FluColors._Blue,FluColors._Teal,FluColors._Green]
|
||||
delegate: Rectangle{
|
||||
width: 42
|
||||
height: 42
|
||||
radius: 4
|
||||
color: mouse_item.containsMouse ? Qt.lighter(modelData.normal,1.1) : modelData.normal
|
||||
FluIcon {
|
||||
anchors.centerIn: parent
|
||||
icon: FluentIcons.FA_check
|
||||
iconSize: 15
|
||||
visible: modelData === FluTheme.primaryColor
|
||||
color: FluApp.isDark ? Qt.rgba(0,0,0,1) : Qt.rgba(1,1,1,1)
|
||||
}
|
||||
MouseArea{
|
||||
id:mouse_item
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
onClicked: {
|
||||
FluTheme.primaryColor = modelData
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -26,5 +26,6 @@
|
||||
<file>res/svg/avatar_12.svg</file>
|
||||
<file>T_Awesome.qml</file>
|
||||
<file>T_TextBox.qml</file>
|
||||
<file>T_Theme.qml</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
Reference in New Issue
Block a user