mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2024-11-23 11:17:15 +08:00
update
This commit is contained in:
parent
e6d2513482
commit
5bb8f27968
@ -38,7 +38,6 @@ FluScrollablePage{
|
|||||||
}
|
}
|
||||||
FluText{
|
FluText{
|
||||||
text:"夜间模式"
|
text:"夜间模式"
|
||||||
fontStyle: FluText.Subtitle
|
|
||||||
Layout.topMargin: 20
|
Layout.topMargin: 20
|
||||||
}
|
}
|
||||||
FluToggleSwitch{
|
FluToggleSwitch{
|
||||||
@ -49,7 +48,6 @@ FluScrollablePage{
|
|||||||
}
|
}
|
||||||
FluText{
|
FluText{
|
||||||
text:"无边框"
|
text:"无边框"
|
||||||
fontStyle: FluText.Subtitle
|
|
||||||
Layout.topMargin: 20
|
Layout.topMargin: 20
|
||||||
}
|
}
|
||||||
FluToggleSwitch{
|
FluToggleSwitch{
|
||||||
@ -58,4 +56,14 @@ FluScrollablePage{
|
|||||||
FluTheme.isFrameless = !FluTheme.isFrameless
|
FluTheme.isFrameless = !FluTheme.isFrameless
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
FluText{
|
||||||
|
text:"native文本渲染"
|
||||||
|
Layout.topMargin: 20
|
||||||
|
}
|
||||||
|
FluToggleSwitch{
|
||||||
|
checked: FluTheme.isNativeText
|
||||||
|
onClickFunc:function(){
|
||||||
|
FluTheme.isNativeText = !FluTheme.isNativeText
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -17,6 +17,7 @@ FluTheme::FluTheme(QObject *parent)
|
|||||||
{
|
{
|
||||||
primaryColor(FluColors::getInstance()->Blue());
|
primaryColor(FluColors::getInstance()->Blue());
|
||||||
textSize(13);
|
textSize(13);
|
||||||
|
isNativeText(false);
|
||||||
isFrameless(false);
|
isFrameless(false);
|
||||||
isDark(false);
|
isDark(false);
|
||||||
}
|
}
|
||||||
|
@ -11,6 +11,7 @@ class FluTheme : public QObject
|
|||||||
Q_PROPERTY_AUTO(FluColorSet*,primaryColor)
|
Q_PROPERTY_AUTO(FluColorSet*,primaryColor)
|
||||||
Q_PROPERTY_AUTO(bool,isFrameless);
|
Q_PROPERTY_AUTO(bool,isFrameless);
|
||||||
Q_PROPERTY_AUTO(bool,isDark);
|
Q_PROPERTY_AUTO(bool,isDark);
|
||||||
|
Q_PROPERTY_AUTO(bool,isNativeText);
|
||||||
Q_PROPERTY_AUTO(int,textSize);
|
Q_PROPERTY_AUTO(int,textSize);
|
||||||
public:
|
public:
|
||||||
explicit FluTheme(QObject *parent = nullptr);
|
explicit FluTheme(QObject *parent = nullptr);
|
||||||
|
@ -20,6 +20,7 @@ TextField{
|
|||||||
return FluTheme.primaryColor.dark
|
return FluTheme.primaryColor.dark
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
renderType: FluTheme.isNativeText ? Text.NativeRendering : Text.QtRendering
|
||||||
placeholderTextColor: {
|
placeholderTextColor: {
|
||||||
if(focus){
|
if(focus){
|
||||||
return FluTheme.isDark ? Qt.rgba(152/255,152/255,152/255,1) : Qt.rgba(141/255,141/255,141/255,1)
|
return FluTheme.isDark ? Qt.rgba(152/255,152/255,152/255,1) : Qt.rgba(141/255,141/255,141/255,1)
|
||||||
|
@ -11,6 +11,7 @@ TextArea{
|
|||||||
width: 300
|
width: 300
|
||||||
color: FluTheme.isDark ? "#FFFFFF" : "#1A1A1A"
|
color: FluTheme.isDark ? "#FFFFFF" : "#1A1A1A"
|
||||||
wrapMode: Text.WrapAnywhere
|
wrapMode: Text.WrapAnywhere
|
||||||
|
renderType: FluTheme.isNativeText ? Text.NativeRendering : Text.QtRendering
|
||||||
selectByMouse: true
|
selectByMouse: true
|
||||||
selectionColor: {
|
selectionColor: {
|
||||||
if(FluTheme.isDark){
|
if(FluTheme.isDark){
|
||||||
|
@ -20,6 +20,7 @@ Text {
|
|||||||
|
|
||||||
id:text
|
id:text
|
||||||
color: textColor
|
color: textColor
|
||||||
|
renderType: FluTheme.isNativeText ? Text.NativeRendering : Text.QtRendering
|
||||||
font.bold: {
|
font.bold: {
|
||||||
switch (fontStyle) {
|
switch (fontStyle) {
|
||||||
case FluText.Display:
|
case FluText.Display:
|
||||||
|
@ -10,6 +10,7 @@ TextField{
|
|||||||
id:input
|
id:input
|
||||||
width: 300
|
width: 300
|
||||||
color: FluTheme.isDark ? "#FFFFFF" : "#1A1A1A"
|
color: FluTheme.isDark ? "#FFFFFF" : "#1A1A1A"
|
||||||
|
renderType: FluTheme.isNativeText ? Text.NativeRendering : Text.QtRendering
|
||||||
selectionColor: {
|
selectionColor: {
|
||||||
if(FluTheme.isDark){
|
if(FluTheme.isDark){
|
||||||
return FluTheme.primaryColor.lighter
|
return FluTheme.primaryColor.lighter
|
||||||
|
Loading…
Reference in New Issue
Block a user