mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2025-07-03 00:25:25 +08:00
update
This commit is contained in:
@ -13,8 +13,8 @@ Rectangle{
|
||||
return borerlessColor
|
||||
return Window.window.active ? borerlessColor : Qt.lighter(borerlessColor,1.1)
|
||||
}
|
||||
property bool isMacos: Qt.platform.os === "osx"
|
||||
height: isMacos ? 0 : 50
|
||||
visible: FluTheme.isFrameless
|
||||
height: visible ? 50 : 0
|
||||
width: {
|
||||
if(parent==null)
|
||||
return 200
|
||||
|
@ -62,9 +62,8 @@ Rectangle {
|
||||
id:button_mouse
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
enabled: !disabled
|
||||
onClicked: {
|
||||
if(disabled)
|
||||
return
|
||||
button.clicked()
|
||||
}
|
||||
}
|
||||
|
@ -9,9 +9,23 @@ Item {
|
||||
property string text: "Check Box"
|
||||
property var checkClicked
|
||||
property bool hovered: mouse_area.containsMouse
|
||||
|
||||
property bool disabled: false
|
||||
|
||||
width: childrenRect.width
|
||||
height: childrenRect.height
|
||||
|
||||
property color borderNormalColor: FluTheme.isDark ? Qt.rgba(160/255,160/255,160/255,1) : Qt.rgba(136/255,136/255,136/255,1)
|
||||
property color borderCheckedColor: FluTheme.isDark ? FluTheme.primaryColor.lighter : FluTheme.primaryColor.dark
|
||||
property color borderHoverColor: FluTheme.isDark ? Qt.rgba(167/255,167/255,167/255,1) : Qt.rgba(135/255,135/255,135/255,1)
|
||||
|
||||
|
||||
property color normalColor: FluTheme.isDark ? Qt.rgba(45/255,45/255,45/255,1) : Qt.rgba(247/255,247/255,247/255,1)
|
||||
property color checkedColor: FluTheme.isDark ? FluTheme.primaryColor.lighter : FluTheme.primaryColor.dark
|
||||
property color hoverColor: FluTheme.isDark ? Qt.rgba(62/255,62/255,62/255,1) : Qt.rgba(244/255,244/255,244/255,1)
|
||||
|
||||
property color checkedHoverColor: FluTheme.isDark ? Qt.darker(checkedColor,1.1) : Qt.lighter(checkedColor,1.1)
|
||||
|
||||
RowLayout{
|
||||
spacing: 4
|
||||
Rectangle{
|
||||
@ -19,46 +33,26 @@ Item {
|
||||
height: 22
|
||||
radius: 4
|
||||
border.color: {
|
||||
if(FluTheme.isDark){
|
||||
if(checked){
|
||||
return FluTheme.primaryColor.lighter
|
||||
}
|
||||
return Qt.rgba(160/255,160/255,160/255,1)
|
||||
}else{
|
||||
if(checked){
|
||||
if(mouse_area.containsMouse){
|
||||
return Qt.rgba(25/255,117/255,187/255,1)
|
||||
}
|
||||
return FluTheme.primaryColor.dark
|
||||
}
|
||||
return Qt.rgba(136/255,136/255,136/255,1)
|
||||
if(checked){
|
||||
return borderCheckedColor
|
||||
}
|
||||
if(hovered){
|
||||
return borderHoverColor
|
||||
}
|
||||
return borderNormalColor
|
||||
}
|
||||
border.width: 1
|
||||
color: {
|
||||
if(FluTheme.isDark){
|
||||
if(checked){
|
||||
if(mouse_area.containsMouse){
|
||||
return Qt.rgba(74/255,149/255,207/255,1)
|
||||
}
|
||||
return FluTheme.primaryColor.lighter
|
||||
if(checked){
|
||||
if(hovered){
|
||||
return checkedHoverColor
|
||||
}
|
||||
if(mouse_area.containsMouse){
|
||||
return Qt.rgba(62/255,62/255,62/255,1)
|
||||
}
|
||||
return Qt.rgba(45/255,45/255,45/255,1)
|
||||
}else{
|
||||
if(checked){
|
||||
if(mouse_area.containsMouse){
|
||||
return Qt.rgba(25/255,117/255,187/255,1)
|
||||
}
|
||||
return FluTheme.primaryColor.dark
|
||||
}
|
||||
if(mouse_area.containsMouse){
|
||||
return Qt.rgba(244/255,244/255,244/255,1)
|
||||
}
|
||||
return Qt.rgba(247/255,247/255,247/255,1)
|
||||
return checkedColor
|
||||
}
|
||||
if(hovered){
|
||||
return hoverColor
|
||||
}
|
||||
return normalColor
|
||||
}
|
||||
|
||||
FluIcon {
|
||||
@ -79,6 +73,7 @@ Item {
|
||||
id:mouse_area
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
enabled: !disabled
|
||||
onClicked: {
|
||||
if(checkClicked){
|
||||
checkClicked()
|
||||
|
@ -21,10 +21,8 @@ Item {
|
||||
property int minimumHeight
|
||||
property int maximumHeight
|
||||
|
||||
property bool isMacos: Qt.platform.os === "osx"
|
||||
|
||||
property int borderless:{
|
||||
if(isMacos){
|
||||
if(!FluTheme.isFrameless){
|
||||
return 0
|
||||
}
|
||||
if(window === null)
|
||||
@ -34,6 +32,7 @@ Item {
|
||||
}
|
||||
return 4
|
||||
}
|
||||
|
||||
default property alias content: container.data
|
||||
|
||||
FluWindowResize{
|
||||
@ -51,7 +50,7 @@ Item {
|
||||
color: {
|
||||
if(window === null)
|
||||
return borerlessColor
|
||||
return window.active ? borerlessColor : Qt.lighter(borerlessColor,1.1)
|
||||
return window.active ? borerlessColor : Qt.lighter(borerlessColor,1.1)
|
||||
}
|
||||
border.width: 1
|
||||
anchors.fill: parent
|
||||
|
Reference in New Issue
Block a user