mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2024-11-25 20:31:35 +08:00
Compare commits
No commits in common. "fe08b08c1fe3ea4e31a3ad5dcdae76c8864d6d54" and "c2b845658d1543dd22b3e146f7f3b85416fb5cce" have entirely different histories.
fe08b08c1f
...
c2b845658d
@ -70,8 +70,8 @@ FluScrollablePage{
|
||||
}
|
||||
|
||||
FluFrame{
|
||||
Layout.preferredWidth: 500
|
||||
Layout.preferredHeight: 370
|
||||
width: 500
|
||||
height: 370
|
||||
padding: 10
|
||||
Layout.topMargin: 20
|
||||
FluChart{
|
||||
|
@ -71,7 +71,7 @@ FluScrollablePage{
|
||||
anchors.centerIn: parent
|
||||
text: "Acrylic"
|
||||
color: "#FFFFFF"
|
||||
font: FluTextStyle.Subtitle
|
||||
font.bold: true
|
||||
}
|
||||
MouseArea {
|
||||
property point clickPos: Qt.point(0,0)
|
||||
|
@ -58,7 +58,6 @@ FluContentPage {
|
||||
FluText {
|
||||
id:item_name
|
||||
font.pixelSize: 10
|
||||
font.family: FluTextStyle.family
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.top: item_icon.bottom
|
||||
width:parent.width
|
||||
|
@ -103,6 +103,7 @@ FluScrollablePage{
|
||||
horizontalAlignment: Qt.AlignHCenter
|
||||
text:model.title
|
||||
color: FluColors.Grey10
|
||||
font.pixelSize: 15
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -122,7 +122,6 @@ FluScrollablePage{
|
||||
Layout.leftMargin: 20
|
||||
color: FluColors.Grey120
|
||||
font.pixelSize: 12
|
||||
font.family: FluTextStyle.family
|
||||
wrapMode: Text.WrapAnywhere
|
||||
}
|
||||
}
|
||||
|
@ -42,7 +42,8 @@ FluContentPage{
|
||||
FluText{
|
||||
color:"#FFFFFF"
|
||||
text:model.index
|
||||
font: FluTextStyle.Title
|
||||
font.bold: true
|
||||
font.pixelSize: 18
|
||||
anchors.centerIn: parent
|
||||
}
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ FluWindow {
|
||||
}
|
||||
FluText{
|
||||
text: qsTr("Drag in a qml file")
|
||||
font: FluTextStyle.Title
|
||||
font.pixelSize: 26
|
||||
anchors.centerIn: parent
|
||||
visible: !loader.itemLodaer().item && loader.statusMode === FluStatusLayoutType.Success
|
||||
}
|
||||
|
@ -101,7 +101,7 @@ FluWindow {
|
||||
width: 186
|
||||
FluMenuItem{
|
||||
text: qsTr("Open in Separate Window")
|
||||
font: FluTextStyle.Caption
|
||||
font.pixelSize: 12
|
||||
onClicked: {
|
||||
FluRouter.navigate("/pageWindow",{title:modelData.title,url:modelData.url})
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ Q_IMPORT_QML_PLUGIN(FluentUIPlugin)
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
#ifdef WIN32
|
||||
// ::SetUnhandledExceptionFilter(MyUnhandledExceptionFilter);
|
||||
::SetUnhandledExceptionFilter(MyUnhandledExceptionFilter);
|
||||
qputenv("QT_QPA_PLATFORM","windows:darkmode=2");
|
||||
#endif
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
|
||||
|
@ -1,5 +1,4 @@
|
||||
#include "FluColors.h"
|
||||
#include "FluTools.h"
|
||||
|
||||
FluColors::FluColors(QObject *parent):QObject{parent}{
|
||||
Transparent(QColor(0, 0, 0, 0));
|
||||
@ -112,12 +111,17 @@ FluColors::FluColors(QObject *parent):QObject{parent}{
|
||||
|
||||
FluAccentColor* FluColors::createAccentColor(QColor primaryColor){
|
||||
FluAccentColor *accentColor = new FluAccentColor(this);
|
||||
accentColor->darkest(FluTools::getInstance()->withOpacity(primaryColor,0.7));
|
||||
accentColor->darker(FluTools::getInstance()->withOpacity(primaryColor,0.8));
|
||||
accentColor->dark(FluTools::getInstance()->withOpacity(primaryColor,0.9));
|
||||
accentColor->darkest(withOpacity(primaryColor,0.7));
|
||||
accentColor->darker(withOpacity(primaryColor,0.8));
|
||||
accentColor->dark(withOpacity(primaryColor,0.9));
|
||||
accentColor->normal(primaryColor);
|
||||
accentColor->light(FluTools::getInstance()->withOpacity(primaryColor,0.9));
|
||||
accentColor->lighter(FluTools::getInstance()->withOpacity(primaryColor,0.8));
|
||||
accentColor->lightest(FluTools::getInstance()->withOpacity(primaryColor,0.7));
|
||||
accentColor->light(withOpacity(primaryColor,0.9));
|
||||
accentColor->lighter(withOpacity(primaryColor,0.8));
|
||||
accentColor->lightest(withOpacity(primaryColor,0.7));
|
||||
return accentColor;
|
||||
}
|
||||
|
||||
QColor FluColors::withOpacity(QColor color,qreal opacity){
|
||||
int alpha = qRound(opacity * 255) & 0xff;
|
||||
return QColor::fromRgba((alpha << 24) | (color.rgba() & 0xffffff));
|
||||
}
|
||||
|
@ -3,7 +3,6 @@
|
||||
|
||||
#include <QObject>
|
||||
#include <QtQml/qqml.h>
|
||||
|
||||
#include "FluAccentColor.h"
|
||||
#include "stdafx.h"
|
||||
#include "singleton.h"
|
||||
@ -51,6 +50,7 @@ class FluColors : public QObject
|
||||
QML_SINGLETON
|
||||
private:
|
||||
explicit FluColors(QObject *parent = nullptr);
|
||||
QColor withOpacity(QColor color,qreal opacity);
|
||||
public:
|
||||
SINGLETON(FluColors)
|
||||
Q_INVOKABLE FluAccentColor* createAccentColor(QColor primaryColor);
|
||||
|
@ -76,7 +76,7 @@ void FluFrameless::componentComplete(){
|
||||
HWND hwnd = reinterpret_cast<HWND>(window()->winId());
|
||||
DWORD style = ::GetWindowLongPtr(hwnd, GWL_STYLE);
|
||||
if(_fixSize){
|
||||
::SetWindowLongPtr(hwnd, GWL_STYLE, style | WS_THICKFRAME | WS_CAPTION);
|
||||
::SetWindowLongPtr(hwnd, GWL_STYLE, style | WS_THICKFRAME);
|
||||
for (int i = 0; i < qApp->screens().count(); ++i) {
|
||||
connect( qApp->screens().at(i),&QScreen::logicalDotsPerInchChanged,this,[=]{
|
||||
SetWindowPos(hwnd,nullptr,0,0,0,0,SWP_NOZORDER | SWP_NOOWNERZORDER | SWP_NOMOVE | SWP_FRAMECHANGED);
|
||||
@ -228,6 +228,12 @@ bool FluFrameless::nativeEventFilter(const QByteArray &eventType, void *message,
|
||||
return true;
|
||||
}else if(uMsg == WM_GETMINMAXINFO){
|
||||
MINMAXINFO* minmaxInfo = reinterpret_cast<MINMAXINFO *>(lParam);
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6,0,0)
|
||||
minmaxInfo->ptMaxPosition.x = 0;
|
||||
minmaxInfo->ptMaxPosition.y = 0;
|
||||
minmaxInfo->ptMaxSize.x = 0;
|
||||
minmaxInfo->ptMaxSize.y = 0;
|
||||
#else
|
||||
auto pixelRatio = window()->devicePixelRatio();
|
||||
auto geometry = window()->screen()->availableGeometry();
|
||||
RECT rect;
|
||||
@ -236,6 +242,7 @@ bool FluFrameless::nativeEventFilter(const QByteArray &eventType, void *message,
|
||||
minmaxInfo->ptMaxPosition.y = rect.top - offsetXY.x();
|
||||
minmaxInfo->ptMaxSize.x = geometry.width()*pixelRatio + offsetXY.x() * 2;
|
||||
minmaxInfo->ptMaxSize.y = geometry.height()*pixelRatio + offsetXY.y() * 2;
|
||||
#endif
|
||||
return false;
|
||||
}else if(uMsg == WM_NCRBUTTONDOWN){
|
||||
if (wParam == HTCAPTION) {
|
||||
|
@ -1,47 +1,35 @@
|
||||
#include "FluTextStyle.h"
|
||||
|
||||
FluTextStyle::FluTextStyle(QObject *parent):QObject{parent}{
|
||||
_family = QFont().defaultFamily();
|
||||
#ifdef Q_OS_WIN
|
||||
_family = "微软雅黑";
|
||||
#endif
|
||||
|
||||
QFont caption;
|
||||
caption.setFamily(_family);
|
||||
caption.setPixelSize(12);
|
||||
Caption(caption);
|
||||
|
||||
QFont body;
|
||||
body.setFamily(_family);
|
||||
body.setPixelSize(13);
|
||||
Body(body);
|
||||
|
||||
QFont bodyStrong;
|
||||
bodyStrong.setFamily(_family);
|
||||
bodyStrong.setPixelSize(13);
|
||||
bodyStrong.setWeight(QFont::DemiBold);
|
||||
BodyStrong(bodyStrong);
|
||||
|
||||
QFont subtitle;
|
||||
subtitle.setFamily(_family);
|
||||
subtitle.setPixelSize(20);
|
||||
subtitle.setWeight(QFont::DemiBold);
|
||||
Subtitle(subtitle);
|
||||
|
||||
QFont title;
|
||||
title.setFamily(_family);
|
||||
title.setPixelSize(28);
|
||||
title.setWeight(QFont::DemiBold);
|
||||
Title(title);
|
||||
|
||||
QFont titleLarge;
|
||||
titleLarge.setFamily(_family);
|
||||
titleLarge.setPixelSize(40);
|
||||
titleLarge.setWeight(QFont::DemiBold);
|
||||
TitleLarge(titleLarge);
|
||||
|
||||
QFont display;
|
||||
display.setFamily(_family);
|
||||
display.setPixelSize(68);
|
||||
display.setWeight(QFont::DemiBold);
|
||||
Display(display);
|
||||
|
@ -14,7 +14,6 @@ class FluTextStyle : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
Q_PROPERTY_AUTO(QString,family)
|
||||
Q_PROPERTY_AUTO(QFont,Caption);
|
||||
Q_PROPERTY_AUTO(QFont,Body);
|
||||
Q_PROPERTY_AUTO(QFont,BodyStrong);
|
||||
|
@ -119,9 +119,8 @@ QUrl FluTools::getUrlByFilePath(const QString& path){
|
||||
return QUrl::fromLocalFile(path);
|
||||
}
|
||||
|
||||
QColor FluTools::withOpacity(const QColor& color,qreal opacity){
|
||||
int alpha = qRound(opacity * 255) & 0xff;
|
||||
return QColor::fromRgba((alpha << 24) | (color.rgba() & 0xffffff));
|
||||
QColor FluTools::colorAlpha(const QColor& color,qreal alpha){
|
||||
return QColor(color.red(),color.green(),color.blue(),255*alpha);
|
||||
}
|
||||
|
||||
QString FluTools::md5(QString text){
|
||||
|
@ -39,7 +39,7 @@ public:
|
||||
Q_INVOKABLE QRect getVirtualGeometry();
|
||||
Q_INVOKABLE QString getApplicationDirPath();
|
||||
Q_INVOKABLE QUrl getUrlByFilePath(const QString& path);
|
||||
Q_INVOKABLE QColor withOpacity(const QColor&,qreal alpha);
|
||||
Q_INVOKABLE QColor colorAlpha(const QColor&,qreal alpha);
|
||||
Q_INVOKABLE QString md5(QString text);
|
||||
Q_INVOKABLE QString sha256(QString text);
|
||||
Q_INVOKABLE QString toBase64(QString text);
|
||||
|
@ -126,7 +126,6 @@ void FluentUI::registerTypes(const char *uri){
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluEvent.qml"),uri,major,minor,"FluEvent");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluSheet.qml"),uri,major,minor,"FluSheet");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluGroupBox.qml"),uri,major,minor,"FluGroupBox");
|
||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluControlBackground.qml"),uri,major,minor,"FluControlBackground");
|
||||
qmlRegisterSingletonType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluRouter.qml"),uri,major,minor,"FluRouter");
|
||||
qmlRegisterSingletonType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluEventBus.qml"),uri,major,minor,"FluEventBus");
|
||||
|
||||
@ -149,6 +148,11 @@ void FluentUI::registerTypes(const char *uri){
|
||||
}
|
||||
|
||||
void FluentUI::initializeEngine(QQmlEngine *engine, const char *uri){
|
||||
#ifdef Q_OS_WIN
|
||||
QFont font;
|
||||
font.setFamily("微软雅黑");
|
||||
QGuiApplication::setFont(font);
|
||||
#endif
|
||||
engine->rootContext()->setContextProperty("FluApp",FluApp::getInstance());
|
||||
engine->rootContext()->setContextProperty("FluColors",FluColors::getInstance());
|
||||
engine->rootContext()->setContextProperty("FluTheme",FluTheme::getInstance());
|
||||
|
@ -7,7 +7,7 @@ Button {
|
||||
property string contentDescription: ""
|
||||
property color normalColor: FluTheme.dark ? Qt.rgba(62/255,62/255,62/255,1) : Qt.rgba(254/255,254/255,254/255,1)
|
||||
property color hoverColor: FluTheme.dark ? Qt.rgba(68/255,68/255,68/255,1) : Qt.rgba(246/255,246/255,246/255,1)
|
||||
property color disableColor: FluTheme.dark ? Qt.rgba(59/255,59/255,59/255,1) : Qt.rgba(251/255,251/255,251/255,1)
|
||||
property color disableColor: FluTheme.dark ? Qt.rgba(59/255,59/255,59/255,1) : Qt.rgba(244/255,244/255,244/255,1)
|
||||
property color dividerColor: FluTheme.dark ? Qt.rgba(80/255,80/255,80/255,1) : Qt.rgba(233/255,233/255,233/255,1)
|
||||
property color textColor: {
|
||||
if(FluTheme.dark){
|
||||
@ -38,17 +38,18 @@ Button {
|
||||
horizontalPadding:12
|
||||
font:FluTextStyle.Body
|
||||
focusPolicy:Qt.TabFocus
|
||||
background: FluControlBackground{
|
||||
implicitWidth: 30
|
||||
implicitHeight: 30
|
||||
background: Rectangle{
|
||||
implicitWidth: 28
|
||||
implicitHeight: 28
|
||||
border.color: control.dividerColor
|
||||
border.width: 1
|
||||
radius: 4
|
||||
color: {
|
||||
color:{
|
||||
if(!enabled){
|
||||
return disableColor
|
||||
}
|
||||
return hovered ? hoverColor :normalColor
|
||||
}
|
||||
shadow: !pressed && enabled
|
||||
FluFocusRectangle{
|
||||
visible: control.activeFocus
|
||||
radius:4
|
||||
|
@ -449,7 +449,7 @@ FluButton {
|
||||
DayOfWeekRow {
|
||||
id: dayOfWeekRow
|
||||
locale: FluApp.locale
|
||||
font: FluTextStyle.Body
|
||||
font.bold: false
|
||||
delegate: Label {
|
||||
text: model.shortName
|
||||
font: dayOfWeekRow.font
|
||||
|
@ -45,7 +45,7 @@ T.ComboBox {
|
||||
topPadding: 6 - control.padding
|
||||
bottomPadding: 6 - control.padding
|
||||
renderType: FluTheme.nativeText ? Text.NativeRendering : Text.QtRendering
|
||||
selectionColor: FluTools.withOpacity(FluTheme.primaryColor,0.5)
|
||||
selectionColor: FluTools.colorAlpha(FluTheme.primaryColor,0.5)
|
||||
selectedTextColor: color
|
||||
text: control.editable ? control.editText : control.displayText
|
||||
enabled: control.editable
|
||||
@ -67,13 +67,7 @@ T.ComboBox {
|
||||
bottomInset:1
|
||||
rightInset:1
|
||||
background: FluTextBoxBackground{
|
||||
border.width: 0
|
||||
bottomMargin: {
|
||||
if(!control.editable){
|
||||
return 0
|
||||
}
|
||||
return contentItem && contentItem.activeFocus ? 2 : 1
|
||||
}
|
||||
borderWidth: 0
|
||||
inputItem: contentItem
|
||||
}
|
||||
Component.onCompleted: {
|
||||
|
@ -1,46 +0,0 @@
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Controls 2.15
|
||||
import FluentUI 1.0
|
||||
|
||||
Item{
|
||||
id:control
|
||||
property int radius: 4
|
||||
property bool shadow: true
|
||||
property alias border: d.border
|
||||
property var bottomMargin: undefined
|
||||
property var topMargin: undefined
|
||||
property var leftMargin: undefined
|
||||
property var rightMargin: undefined
|
||||
property color color: FluTheme.dark ? Qt.rgba(42/255,42/255,42/255,1) : Qt.rgba(254/255,254/255,254/255,1)
|
||||
property alias gradient : rect_border.gradient
|
||||
Rectangle{
|
||||
id:d
|
||||
property color startColor: Qt.lighter(d.border.color,1.25)
|
||||
property color endColor: shadow ? control.border.color : startColor
|
||||
visible: false
|
||||
border.color: FluTheme.dark ? Qt.rgba(48/255,48/255,48/255,1) : Qt.rgba(188/255,188/255,188/255,1)
|
||||
}
|
||||
Rectangle{
|
||||
id:rect_border
|
||||
anchors.fill: parent
|
||||
radius: control.radius
|
||||
gradient: Gradient {
|
||||
GradientStop { position: 0.0; color: d.startColor }
|
||||
GradientStop { position: 0.88; color: d.startColor }
|
||||
GradientStop { position: 1.0; color: d.endColor}
|
||||
}
|
||||
}
|
||||
Rectangle{
|
||||
id:rect_back
|
||||
anchors{
|
||||
fill: parent
|
||||
margins: control.border.width
|
||||
topMargin: control.topMargin
|
||||
bottomMargin: control.bottomMargin
|
||||
leftMargin: control.leftMargin
|
||||
rightMargin: control.rightMargin
|
||||
}
|
||||
radius: control.radius
|
||||
color: control.color
|
||||
}
|
||||
}
|
@ -17,7 +17,7 @@ TextEdit {
|
||||
selectByMouse: true
|
||||
selectedTextColor: color
|
||||
bottomPadding: 0
|
||||
selectionColor: FluTools.withOpacity(FluTheme.primaryColor,0.5)
|
||||
selectionColor: FluTools.colorAlpha(FluTheme.primaryColor,0.5)
|
||||
font:FluTextStyle.Body
|
||||
onSelectedTextChanged: {
|
||||
control.forceActiveFocus()
|
||||
|
@ -42,7 +42,7 @@ FluButton {
|
||||
id:divider_1
|
||||
width: 1
|
||||
x: parent.width/3
|
||||
height: parent.height - 1
|
||||
height: parent.height
|
||||
color: control.dividerColor
|
||||
visible: showYear
|
||||
}
|
||||
@ -50,7 +50,7 @@ FluButton {
|
||||
id:divider_2
|
||||
width: 1
|
||||
x: showYear ? parent.width*2/3 : parent.width/2
|
||||
height: parent.height - 1
|
||||
height: parent.height
|
||||
color: control.dividerColor
|
||||
}
|
||||
FluText{
|
||||
|
@ -3,12 +3,59 @@ import QtQuick.Controls 2.15
|
||||
import QtQuick.Window 2.15
|
||||
import FluentUI 1.0
|
||||
|
||||
FluButton {
|
||||
id: control
|
||||
Button {
|
||||
property bool disabled: false
|
||||
property string contentDescription: ""
|
||||
property color normalColor: FluTheme.dark ? Qt.rgba(62/255,62/255,62/255,1) : Qt.rgba(254/255,254/255,254/255,1)
|
||||
property color hoverColor: FluTheme.dark ? Qt.rgba(68/255,68/255,68/255,1) : Qt.rgba(246/255,246/255,246/255,1)
|
||||
property color disableColor: FluTheme.dark ? Qt.rgba(59/255,59/255,59/255,1) : Qt.rgba(244/255,244/255,244/255,1)
|
||||
property color textColor: {
|
||||
if(FluTheme.dark){
|
||||
if(!enabled){
|
||||
return Qt.rgba(131/255,131/255,131/255,1)
|
||||
}
|
||||
if(pressed){
|
||||
return Qt.rgba(162/255,162/255,162/255,1)
|
||||
}
|
||||
return Qt.rgba(1,1,1,1)
|
||||
}else{
|
||||
if(!enabled){
|
||||
return Qt.rgba(160/255,160/255,160/255,1)
|
||||
}
|
||||
if(pressed){
|
||||
return Qt.rgba(96/255,96/255,96/255,1)
|
||||
}
|
||||
return Qt.rgba(0,0,0,1)
|
||||
}
|
||||
}
|
||||
property var window : Window.window
|
||||
default property alias contentData: menu.contentData
|
||||
Accessible.role: Accessible.Button
|
||||
Accessible.name: control.text
|
||||
Accessible.description: contentDescription
|
||||
Accessible.onPressAction: control.clicked()
|
||||
id: control
|
||||
rightPadding:35
|
||||
enabled: !disabled
|
||||
focusPolicy:Qt.TabFocus
|
||||
verticalPadding: 0
|
||||
horizontalPadding:12
|
||||
background: Rectangle{
|
||||
implicitWidth: 28
|
||||
implicitHeight: 28
|
||||
border.color: FluTheme.dark ? "#505050" : "#DFDFDF"
|
||||
border.width: 1
|
||||
radius: 4
|
||||
FluFocusRectangle{
|
||||
visible: control.activeFocus
|
||||
radius:8
|
||||
}
|
||||
color:{
|
||||
if(!enabled){
|
||||
return disableColor
|
||||
}
|
||||
return hovered ? hoverColor :normalColor
|
||||
}
|
||||
FluIcon{
|
||||
iconSource:FluentIcons.ChevronDown
|
||||
iconSize: 15
|
||||
@ -17,7 +64,14 @@ FluButton {
|
||||
rightMargin: 10
|
||||
verticalCenter: parent.verticalCenter
|
||||
}
|
||||
iconColor:control.textColor
|
||||
iconColor:title.color
|
||||
}
|
||||
}
|
||||
contentItem: FluText {
|
||||
id:title
|
||||
text: control.text
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
color: control.textColor
|
||||
}
|
||||
onClicked: {
|
||||
if(menu.count !==0){
|
||||
|
@ -26,8 +26,8 @@ Item {
|
||||
width: parent.width
|
||||
height: 45
|
||||
radius: 4
|
||||
border.color: FluTheme.dividerColor
|
||||
color: FluTheme.dark ? Window.active ? Qt.rgba(39/255,39/255,39/255,1) : Qt.rgba(39/255,39/255,39/255,1) : Qt.rgba(251/255,251/255,253/255,1)
|
||||
color: FluTheme.dark ? Window.active ? Qt.rgba(38/255,44/255,54/255,1) : Qt.rgba(39/255,39/255,39/255,1) : Qt.rgba(251/255,251/255,253/255,1)
|
||||
border.color: FluTheme.dark ? Window.active ? Qt.rgba(55/255,55/255,55/255,1) : Qt.rgba(45/255,45/255,45/255,1) : Qt.rgba(226/255,229/255,234/255,1)
|
||||
MouseArea{
|
||||
id:control_mouse
|
||||
anchors.fill: parent
|
||||
@ -90,7 +90,7 @@ Item {
|
||||
radius: 4
|
||||
clip: true
|
||||
color: FluTheme.dark ? Qt.rgba(39/255,39/255,39/255,1) : Qt.rgba(251/255,251/255,253/255,1)
|
||||
border.color: FluTheme.dividerColor
|
||||
border.color: FluTheme.dark ? Qt.rgba(45/255,45/255,45/255,1) : Qt.rgba(226/255,229/255,234/255,1)
|
||||
anchors.topMargin: -contentHeight
|
||||
states: [
|
||||
State{
|
||||
|
@ -29,13 +29,27 @@ Button {
|
||||
font:FluTextStyle.Body
|
||||
verticalPadding: 0
|
||||
horizontalPadding:12
|
||||
background: FluControlBackground{
|
||||
implicitWidth: 30
|
||||
implicitHeight: 30
|
||||
background: Rectangle{
|
||||
implicitWidth: 28
|
||||
implicitHeight: 28
|
||||
radius: 4
|
||||
bottomMargin: enabled ? 2 : 0
|
||||
border.width: enabled ? 1 : 0
|
||||
border.color: enabled ? Qt.darker(control.normalColor,1.2) : disableColor
|
||||
FluFocusRectangle{
|
||||
visible: control.visualFocus
|
||||
radius:4
|
||||
}
|
||||
gradient: Gradient {
|
||||
GradientStop { position: 0.33; color: control.enabled ? control.normalColor : Qt.rgba(0,0,0,0) }
|
||||
GradientStop { position: 1.0; color: control.enabled ? Qt.darker(control.normalColor,1.3) : Qt.rgba(0,0,0,0) }
|
||||
}
|
||||
Rectangle{
|
||||
radius: parent.radius
|
||||
anchors{
|
||||
fill: parent
|
||||
topMargin: control.enabled ? 0 : 0
|
||||
leftMargin: control.enabled ? 1 : 0
|
||||
rightMargin: control.enabled ? 1 : 0
|
||||
bottomMargin: control.enabled ? 2 : 0
|
||||
}
|
||||
color:{
|
||||
if(!enabled){
|
||||
return disableColor
|
||||
@ -45,9 +59,6 @@ Button {
|
||||
}
|
||||
return hovered ? hoverColor :normalColor
|
||||
}
|
||||
FluFocusRectangle{
|
||||
visible: control.visualFocus
|
||||
radius:4
|
||||
}
|
||||
}
|
||||
contentItem: FluText {
|
||||
|
@ -18,7 +18,7 @@ T.Frame {
|
||||
background: Rectangle {
|
||||
id:d
|
||||
radius: 4
|
||||
border.color: FluTheme.dividerColor
|
||||
color: FluTheme.dark ? Window.active ? Qt.rgba(39/255,39/255,39/255,1) : Qt.rgba(45/255,45/255,45/255,1) : Qt.rgba(251/255,251/255,253/255,1)
|
||||
border.color: FluTheme.dark ? Window.active ? Qt.rgba(55/255,55/255,55/255,1):Qt.rgba(45/255,45/255,45/255,1) : Qt.rgba(226/255,229/255,234/255,1)
|
||||
color: FluTheme.dark ? Window.active ? Qt.rgba(38/255,44/255,54/255,1) : Qt.rgba(39/255,39/255,39/255,1) : Qt.rgba(251/255,251/255,253/255,1)
|
||||
}
|
||||
}
|
||||
|
@ -51,9 +51,9 @@ T.Menu {
|
||||
FluShadow{}
|
||||
}
|
||||
T.Overlay.modal: Rectangle {
|
||||
color: FluTools.withOpacity(control.palette.shadow, 0.5)
|
||||
color: FluTools.colorAlpha(control.palette.shadow, 0.5)
|
||||
}
|
||||
T.Overlay.modeless: Rectangle {
|
||||
color: FluTools.withOpacity(control.palette.shadow, 0.12)
|
||||
color: FluTools.colorAlpha(control.palette.shadow, 0.12)
|
||||
}
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ TextArea{
|
||||
leftPadding: padding+4
|
||||
renderType: FluTheme.nativeText ? Text.NativeRendering : Text.QtRendering
|
||||
selectedTextColor: color
|
||||
selectionColor: FluTools.withOpacity(FluTheme.primaryColor,0.5)
|
||||
selectionColor: FluTools.colorAlpha(FluTheme.primaryColor,0.5)
|
||||
placeholderTextColor: {
|
||||
if(!enabled){
|
||||
return placeholderDisableColor
|
||||
|
@ -25,7 +25,7 @@ TextField{
|
||||
leftPadding: padding+4
|
||||
echoMode:btn_reveal.pressed ? TextField.Normal : TextField.Password
|
||||
renderType: FluTheme.nativeText ? Text.NativeRendering : Text.QtRendering
|
||||
selectionColor: FluTools.withOpacity(FluTheme.primaryColor,0.5)
|
||||
selectionColor: FluTools.colorAlpha(FluTheme.primaryColor,0.5)
|
||||
selectedTextColor: color
|
||||
placeholderTextColor: {
|
||||
if(!enabled){
|
||||
|
@ -7,18 +7,19 @@ Page {
|
||||
property alias currentIndex: nav_list.currentIndex
|
||||
property color textNormalColor: FluTheme.dark ? FluColors.Grey120 : FluColors.Grey120
|
||||
property color textHoverColor: FluTheme.dark ? FluColors.Grey10 : FluColors.Black
|
||||
property int textSize: 28
|
||||
property bool textBold: true
|
||||
property int textSpacing: 10
|
||||
property int headerSpacing: 20
|
||||
property int headerHeight: 40
|
||||
id:control
|
||||
width: 400
|
||||
height: 300
|
||||
font: FluTextStyle.Title
|
||||
implicitHeight: height
|
||||
implicitWidth: width
|
||||
FluObject{
|
||||
id:d
|
||||
property int tabY: control.headerHeight/2+control.font.pixelSize/2 + 3
|
||||
property int tabY: control.headerHeight/2+control.textSize/2 + 3
|
||||
}
|
||||
background:Item{}
|
||||
header:ListView{
|
||||
@ -64,7 +65,8 @@ Page {
|
||||
id:item_title
|
||||
text: modelData.title
|
||||
anchors.centerIn: parent
|
||||
font: control.font
|
||||
font.pixelSize: control.textSize
|
||||
font.bold: control.textBold
|
||||
color: {
|
||||
if(item_button.hovered)
|
||||
return textHoverColor
|
||||
|
@ -2,13 +2,14 @@ import QtQuick 2.15
|
||||
import QtQuick.Controls 2.15
|
||||
import FluentUI 1.0
|
||||
|
||||
FluButton {
|
||||
Button {
|
||||
property real progress
|
||||
property bool disabled: false
|
||||
property string contentDescription: ""
|
||||
QtObject{
|
||||
id:d
|
||||
property bool checked: (Number(rect_back.height) === Number(background.height)) && (progress === 1)
|
||||
property bool checked: (rect_back.height === background.height) && (progress === 1)
|
||||
}
|
||||
id: control
|
||||
property color normalColor: {
|
||||
if(d.checked){
|
||||
return FluTheme.primaryColor
|
||||
@ -31,12 +32,24 @@ FluButton {
|
||||
}
|
||||
}
|
||||
property color pressedColor: FluTheme.dark ? Qt.darker(normalColor,1.2) : Qt.lighter(normalColor,1.2)
|
||||
background: FluControlBackground{
|
||||
implicitWidth: 30
|
||||
implicitHeight: 30
|
||||
radius: 4
|
||||
border.color: FluTheme.dark ? Qt.rgba(48/255,48/255,48/255,1) : Qt.rgba(188/255,188/255,188/255,1)
|
||||
Accessible.role: Accessible.Button
|
||||
Accessible.name: control.text
|
||||
Accessible.description: contentDescription
|
||||
Accessible.onPressAction: control.clicked()
|
||||
focusPolicy:Qt.TabFocus
|
||||
id: control
|
||||
enabled: !disabled
|
||||
verticalPadding: 0
|
||||
horizontalPadding:12
|
||||
background: FluClip{
|
||||
implicitWidth: 28
|
||||
implicitHeight: 28
|
||||
radius: [4,4,4,4]
|
||||
Rectangle{
|
||||
anchors.fill: parent
|
||||
border.color: FluTheme.dark ? "#505050" : "#DFDFDF"
|
||||
border.width: d.checked ? 0 : 1
|
||||
radius: 4
|
||||
color:{
|
||||
if(!enabled){
|
||||
return disableColor
|
||||
@ -48,9 +61,7 @@ FluButton {
|
||||
}
|
||||
return hovered ? hoverColor :normalColor
|
||||
}
|
||||
FluClip{
|
||||
anchors.fill: parent
|
||||
radius: [4,4,4,4]
|
||||
}
|
||||
Rectangle{
|
||||
id:rect_back
|
||||
width: parent.width * control.progress
|
||||
@ -77,7 +88,6 @@ FluButton {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
FluFocusRectangle{
|
||||
visible: control.activeFocus
|
||||
radius:4
|
||||
|
@ -131,9 +131,10 @@ FluIconButton {
|
||||
width: Math.max(item_text.implicitWidth+12,28)
|
||||
height: Math.max(item_text.implicitHeight,28)
|
||||
radius: 4
|
||||
FluText{
|
||||
Text{
|
||||
id:item_text
|
||||
color: FluTheme.dark ? Qt.rgba(0,0,0,1) : Qt.rgba(1,1,1,1)
|
||||
font.pixelSize: 13
|
||||
text: keyText
|
||||
anchors.centerIn: parent
|
||||
}
|
||||
|
@ -39,7 +39,7 @@ T.SpinBox {
|
||||
}
|
||||
return normalColor
|
||||
}
|
||||
selectionColor: FluTools.withOpacity(FluTheme.primaryColor,0.5)
|
||||
selectionColor: FluTools.colorAlpha(FluTheme.primaryColor,0.5)
|
||||
selectedTextColor: color
|
||||
horizontalAlignment: Qt.AlignHCenter
|
||||
verticalAlignment: Qt.AlignVCenter
|
||||
|
@ -15,7 +15,7 @@ Rectangle {
|
||||
property bool horizonalHeaderVisible: true
|
||||
property bool verticalHeaderVisible: true
|
||||
property color selectedBorderColor: FluTheme.primaryColor
|
||||
property color selectedColor: FluTools.withOpacity(FluTheme.primaryColor,0.3)
|
||||
property color selectedColor: FluTools.colorAlpha(FluTheme.primaryColor,0.3)
|
||||
id:control
|
||||
color: FluTheme.dark ? Qt.rgba(39/255,39/255,39/255,1) : Qt.rgba(251/255,251/255,253/255,1)
|
||||
onColumnSourceChanged: {
|
||||
|
@ -25,7 +25,7 @@ TextField{
|
||||
}
|
||||
font:FluTextStyle.Body
|
||||
renderType: FluTheme.nativeText ? Text.NativeRendering : Text.QtRendering
|
||||
selectionColor: FluTools.withOpacity(FluTheme.primaryColor,0.5)
|
||||
selectionColor: FluTools.colorAlpha(FluTheme.primaryColor,0.5)
|
||||
selectedTextColor: color
|
||||
placeholderTextColor: {
|
||||
if(!enabled){
|
||||
|
@ -2,9 +2,14 @@ import QtQuick 2.15
|
||||
import QtQuick.Controls 2.15
|
||||
import FluentUI 1.0
|
||||
|
||||
FluControlBackground{
|
||||
FluClip{
|
||||
property Item inputItem
|
||||
property int borderWidth: 1
|
||||
id:control
|
||||
radius: [4,4,4,4]
|
||||
Rectangle{
|
||||
radius: 4
|
||||
anchors.fill: parent
|
||||
color: {
|
||||
if(inputItem && inputItem.disabled){
|
||||
return FluTheme.dark ? Qt.rgba(59/255,59/255,59/255,1) : Qt.rgba(252/255,252/255,252/255,1)
|
||||
@ -17,21 +22,35 @@ FluControlBackground{
|
||||
}
|
||||
return FluTheme.dark ? Qt.rgba(62/255,62/255,62/255,1) : Qt.rgba(1,1,1,1)
|
||||
}
|
||||
border.width: 1
|
||||
gradient: Gradient {
|
||||
GradientStop { position: 0.0; color: d.startColor }
|
||||
GradientStop { position: 0.92; color: d.startColor }
|
||||
GradientStop { position: 1.0; color: d.endColor }
|
||||
border.width: control.borderWidth
|
||||
border.color: {
|
||||
if(inputItem && inputItem.disabled){
|
||||
return FluTheme.dark ? Qt.rgba(73/255,73/255,73/255,1) : Qt.rgba(237/255,237/255,237/255,1)
|
||||
}
|
||||
bottomMargin: inputItem && inputItem.activeFocus ? 2 : 1
|
||||
QtObject{
|
||||
id:d
|
||||
property color startColor: FluTheme.dark ? Qt.rgba(66/255,66/255,66/255,1) : Qt.rgba(232/255,232/255,232/255,1)
|
||||
property color endColor: {
|
||||
if(!control.enabled){
|
||||
return d.startColor
|
||||
return FluTheme.dark ? Qt.rgba(76/255,76/255,76/255,1) : Qt.rgba(240/255,240/255,240/255,1)
|
||||
}
|
||||
}
|
||||
Rectangle{
|
||||
width: parent.width
|
||||
height: inputItem && inputItem.activeFocus ? 2 : 1
|
||||
anchors.bottom: parent.bottom
|
||||
visible: !(inputItem && inputItem.disabled)
|
||||
color: {
|
||||
if(inputItem && inputItem.activeFocus){
|
||||
return FluTheme.primaryColor
|
||||
}
|
||||
if(FluTheme.dark){
|
||||
return Qt.rgba(166/255,166/255,166/255,1)
|
||||
}else{
|
||||
return Qt.rgba(134/255,134/255,134/255,1)
|
||||
}
|
||||
}
|
||||
Behavior on height{
|
||||
enabled: FluTheme.animationEnabled
|
||||
NumberAnimation{
|
||||
duration: 83
|
||||
easing.type: Easing.OutCubic
|
||||
}
|
||||
return inputItem && inputItem.activeFocus ? FluTheme.primaryColor : FluTheme.dark ? Qt.rgba(123/255,123/255,123/255,1) : Qt.rgba(132/255,132/255,132/255,1)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -28,8 +28,8 @@ Button {
|
||||
enabled: !disabled
|
||||
font:FluTextStyle.Body
|
||||
background: Rectangle{
|
||||
implicitWidth: 30
|
||||
implicitHeight: 30
|
||||
implicitWidth: 28
|
||||
implicitHeight: 28
|
||||
radius: 4
|
||||
color: {
|
||||
if(!enabled){
|
||||
|
@ -58,14 +58,14 @@ FluButton {
|
||||
id: divider_1
|
||||
width: 1
|
||||
x: isH ? parent.width/3 : parent.width/2
|
||||
height: parent.height - 1
|
||||
height: parent.height
|
||||
color: dividerColor
|
||||
}
|
||||
Rectangle{
|
||||
id: divider_2
|
||||
width: 1
|
||||
x: parent.width*2/3
|
||||
height: parent.height - 1
|
||||
height: parent.height
|
||||
color: dividerColor
|
||||
visible: isH
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ Button {
|
||||
if(checked){
|
||||
return FluTheme.dark ? Qt.rgba(82/255,82/255,82/255,1) : Qt.rgba(199/255,199/255,199/255,1)
|
||||
}else{
|
||||
return FluTheme.dark ? Qt.rgba(59/255,59/255,59/255,1) : Qt.rgba(251/255,251/255,251/255,1)
|
||||
return FluTheme.dark ? Qt.rgba(59/255,59/255,59/255,1) : Qt.rgba(244/255,244/255,244/255,1)
|
||||
}
|
||||
}
|
||||
property var clickListener : function(){
|
||||
@ -45,14 +45,27 @@ Button {
|
||||
}
|
||||
}
|
||||
onClicked: clickListener()
|
||||
background: FluControlBackground{
|
||||
implicitWidth: 30
|
||||
implicitHeight: 30
|
||||
background: Rectangle{
|
||||
implicitWidth: 28
|
||||
implicitHeight: 28
|
||||
radius: 4
|
||||
FluFocusRectangle{
|
||||
visible: control.activeFocus
|
||||
radius:4
|
||||
}
|
||||
gradient: Gradient {
|
||||
GradientStop { position: 0.33; color: control.enabled ? control.normalColor : Qt.rgba(0,0,0,0) }
|
||||
GradientStop { position: 1.0; color: control.enabled ? Qt.darker(control.normalColor,1.3) : Qt.rgba(0,0,0,0) }
|
||||
}
|
||||
Rectangle{
|
||||
radius: parent.radius
|
||||
anchors{
|
||||
fill: parent
|
||||
topMargin: checked && enabled ? 0 : 0
|
||||
leftMargin: checked && enabled ? 1 : 0
|
||||
rightMargin: checked && enabled ? 1 : 0
|
||||
bottomMargin: checked && enabled ? 2 : 0
|
||||
}
|
||||
color:{
|
||||
if(!enabled){
|
||||
return disableColor
|
||||
@ -64,33 +77,13 @@ Button {
|
||||
}
|
||||
return hovered ? hoverColor :normalColor
|
||||
}
|
||||
bottomMargin: {
|
||||
if(checked){
|
||||
return enabled ? 2 : 0
|
||||
}else{
|
||||
return 1
|
||||
}
|
||||
}
|
||||
border.width: {
|
||||
if(checked){
|
||||
return enabled ? 1 : 0
|
||||
}else{
|
||||
return 1
|
||||
}
|
||||
}
|
||||
shadow: {
|
||||
if(checked){
|
||||
return true
|
||||
}else{
|
||||
return !pressed && enabled
|
||||
}
|
||||
}
|
||||
border.color: {
|
||||
if(checked){
|
||||
return enabled ? Qt.darker(control.normalColor,1.2) : disableColor
|
||||
}else{
|
||||
return FluTheme.dark ? Qt.rgba(48/255,48/255,48/255,1) : Qt.rgba(188/255,188/255,188/255,1)
|
||||
}
|
||||
Rectangle{
|
||||
color:"#00000000"
|
||||
anchors.fill: parent
|
||||
border.color: FluTheme.dark ? "#505050" : "#DFDFDF"
|
||||
border.width: checked ? 0 : 1
|
||||
radius: parent.radius
|
||||
}
|
||||
}
|
||||
contentItem: FluText {
|
||||
|
@ -43,9 +43,9 @@ Window {
|
||||
property bool useSystemAppBar
|
||||
property color resizeBorderColor: {
|
||||
if(window.active){
|
||||
return FluTheme.dark ? Qt.rgba(51/255,51/255,51/255,1) : Qt.rgba(110/255,110/255,110/255,1)
|
||||
return FluTheme.dark ? "#333333" : "#6E6E6E"
|
||||
}
|
||||
return FluTheme.dark ? Qt.rgba(61/255,61/255,61/255,1) : Qt.rgba(167/255,167/255,167/255,1)
|
||||
return FluTheme.dark ? "#3D3D3E" : "#A7A7A7"
|
||||
}
|
||||
property int resizeBorderWidth: 1
|
||||
property var closeListener: function(event){
|
||||
|
@ -19,7 +19,6 @@ FluComboBox 1.0 Controls/FluComboBox.qml
|
||||
FluContentDialog 1.0 Controls/FluContentDialog.qml
|
||||
FluContentPage 1.0 Controls/FluContentPage.qml
|
||||
FluControl 1.0 Controls/FluControl.qml
|
||||
FluControlBackground 1.0 Controls/FluControlBackground.qml
|
||||
FluCopyableText 1.0 Controls/FluCopyableText.qml
|
||||
FluDatePicker 1.0 Controls/FluDatePicker.qml
|
||||
FluDivider 1.0 Controls/FluDivider.qml
|
||||
|
@ -109,6 +109,5 @@
|
||||
<file>FluentUI/Controls/FluFrame.qml</file>
|
||||
<file>FluentUI/Controls/FluSheet.qml</file>
|
||||
<file>FluentUI/Controls/FluGroupBox.qml</file>
|
||||
<file>FluentUI/Controls/FluControlBackground.qml</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
@ -3,13 +3,12 @@ import QtQuick.Controls
|
||||
import QtQuick.Controls.Basic
|
||||
import FluentUI
|
||||
|
||||
|
||||
Button {
|
||||
property bool disabled: false
|
||||
property string contentDescription: ""
|
||||
property color normalColor: FluTheme.dark ? Qt.rgba(62/255,62/255,62/255,1) : Qt.rgba(254/255,254/255,254/255,1)
|
||||
property color hoverColor: FluTheme.dark ? Qt.rgba(68/255,68/255,68/255,1) : Qt.rgba(246/255,246/255,246/255,1)
|
||||
property color disableColor: FluTheme.dark ? Qt.rgba(59/255,59/255,59/255,1) : Qt.rgba(251/255,251/255,251/255,1)
|
||||
property color disableColor: FluTheme.dark ? Qt.rgba(59/255,59/255,59/255,1) : Qt.rgba(244/255,244/255,244/255,1)
|
||||
property color dividerColor: FluTheme.dark ? Qt.rgba(80/255,80/255,80/255,1) : Qt.rgba(233/255,233/255,233/255,1)
|
||||
property color textColor: {
|
||||
if(FluTheme.dark){
|
||||
@ -40,17 +39,18 @@ Button {
|
||||
horizontalPadding:12
|
||||
font:FluTextStyle.Body
|
||||
focusPolicy:Qt.TabFocus
|
||||
background: FluControlBackground{
|
||||
implicitWidth: 30
|
||||
implicitHeight: 30
|
||||
background: Rectangle{
|
||||
implicitWidth: 28
|
||||
implicitHeight: 28
|
||||
border.color: control.dividerColor
|
||||
border.width: 1
|
||||
radius: 4
|
||||
color: {
|
||||
color:{
|
||||
if(!enabled){
|
||||
return disableColor
|
||||
}
|
||||
return hovered ? hoverColor :normalColor
|
||||
}
|
||||
shadow: !pressed && enabled
|
||||
FluFocusRectangle{
|
||||
visible: control.activeFocus
|
||||
radius:4
|
||||
|
@ -448,7 +448,7 @@ FluButton {
|
||||
DayOfWeekRow {
|
||||
id: dayOfWeekRow
|
||||
locale: FluApp.locale
|
||||
font: FluTextStyle.Body
|
||||
font.bold: false
|
||||
delegate: Label {
|
||||
text: model.shortName
|
||||
font: dayOfWeekRow.font
|
||||
|
@ -45,7 +45,7 @@ T.ComboBox {
|
||||
topPadding: 6 - control.padding
|
||||
bottomPadding: 6 - control.padding
|
||||
renderType: FluTheme.nativeText ? Text.NativeRendering : Text.QtRendering
|
||||
selectionColor: FluTools.withOpacity(FluTheme.primaryColor,0.5)
|
||||
selectionColor: FluTools.colorAlpha(FluTheme.primaryColor,0.5)
|
||||
selectedTextColor: color
|
||||
text: control.editable ? control.editText : control.displayText
|
||||
enabled: control.editable
|
||||
@ -67,13 +67,7 @@ T.ComboBox {
|
||||
bottomInset:1
|
||||
rightInset:1
|
||||
background: FluTextBoxBackground{
|
||||
border.width: 0
|
||||
bottomMargin: {
|
||||
if(!control.editable){
|
||||
return 0
|
||||
}
|
||||
return contentItem && contentItem.activeFocus ? 2 : 1
|
||||
}
|
||||
borderWidth: 0
|
||||
inputItem: contentItem
|
||||
}
|
||||
Component.onCompleted: {
|
||||
|
@ -1,46 +0,0 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import FluentUI
|
||||
|
||||
Item{
|
||||
id:control
|
||||
property int radius: 4
|
||||
property bool shadow: true
|
||||
property alias border: d.border
|
||||
property var bottomMargin: undefined
|
||||
property var topMargin: undefined
|
||||
property var leftMargin: undefined
|
||||
property var rightMargin: undefined
|
||||
property color color: FluTheme.dark ? Qt.rgba(42/255,42/255,42/255,1) : Qt.rgba(254/255,254/255,254/255,1)
|
||||
property alias gradient : rect_border.gradient
|
||||
Rectangle{
|
||||
id:d
|
||||
property color startColor: Qt.lighter(d.border.color,1.25)
|
||||
property color endColor: shadow ? control.border.color : startColor
|
||||
visible: false
|
||||
border.color: FluTheme.dark ? Qt.rgba(48/255,48/255,48/255,1) : Qt.rgba(188/255,188/255,188/255,1)
|
||||
}
|
||||
Rectangle{
|
||||
id:rect_border
|
||||
anchors.fill: parent
|
||||
radius: control.radius
|
||||
gradient: Gradient {
|
||||
GradientStop { position: 0.0; color: d.startColor }
|
||||
GradientStop { position: 0.88; color: d.startColor }
|
||||
GradientStop { position: 1.0; color: d.endColor}
|
||||
}
|
||||
}
|
||||
Rectangle{
|
||||
id:rect_back
|
||||
anchors{
|
||||
fill: parent
|
||||
margins: control.border.width
|
||||
topMargin: control.topMargin
|
||||
bottomMargin: control.bottomMargin
|
||||
leftMargin: control.leftMargin
|
||||
rightMargin: control.rightMargin
|
||||
}
|
||||
radius: control.radius
|
||||
color: control.color
|
||||
}
|
||||
}
|
@ -17,7 +17,7 @@ TextEdit {
|
||||
selectByMouse: true
|
||||
selectedTextColor: color
|
||||
bottomPadding: 0
|
||||
selectionColor: FluTools.withOpacity(FluTheme.primaryColor,0.5)
|
||||
selectionColor: FluTools.colorAlpha(FluTheme.primaryColor,0.5)
|
||||
font:FluTextStyle.Body
|
||||
onSelectedTextChanged: {
|
||||
control.forceActiveFocus()
|
||||
|
@ -41,7 +41,7 @@ FluButton {
|
||||
id:divider_1
|
||||
width: 1
|
||||
x: parent.width/3
|
||||
height: parent.height-1
|
||||
height: parent.height
|
||||
color: control.dividerColor
|
||||
visible: showYear
|
||||
}
|
||||
@ -49,7 +49,7 @@ FluButton {
|
||||
id:divider_2
|
||||
width: 1
|
||||
x: showYear ? parent.width*2/3 : parent.width/2
|
||||
height: parent.height-1
|
||||
height: parent.height
|
||||
color: control.dividerColor
|
||||
}
|
||||
FluText{
|
||||
|
@ -4,12 +4,59 @@ import QtQuick.Controls.Basic
|
||||
import QtQuick.Window
|
||||
import FluentUI
|
||||
|
||||
FluButton {
|
||||
id: control
|
||||
Button {
|
||||
property bool disabled: false
|
||||
property string contentDescription: ""
|
||||
property color normalColor: FluTheme.dark ? Qt.rgba(62/255,62/255,62/255,1) : Qt.rgba(254/255,254/255,254/255,1)
|
||||
property color hoverColor: FluTheme.dark ? Qt.rgba(68/255,68/255,68/255,1) : Qt.rgba(246/255,246/255,246/255,1)
|
||||
property color disableColor: FluTheme.dark ? Qt.rgba(59/255,59/255,59/255,1) : Qt.rgba(244/255,244/255,244/255,1)
|
||||
property color textColor: {
|
||||
if(FluTheme.dark){
|
||||
if(!enabled){
|
||||
return Qt.rgba(131/255,131/255,131/255,1)
|
||||
}
|
||||
if(pressed){
|
||||
return Qt.rgba(162/255,162/255,162/255,1)
|
||||
}
|
||||
return Qt.rgba(1,1,1,1)
|
||||
}else{
|
||||
if(!enabled){
|
||||
return Qt.rgba(160/255,160/255,160/255,1)
|
||||
}
|
||||
if(pressed){
|
||||
return Qt.rgba(96/255,96/255,96/255,1)
|
||||
}
|
||||
return Qt.rgba(0,0,0,1)
|
||||
}
|
||||
}
|
||||
property var window : Window.window
|
||||
default property alias contentData: menu.contentData
|
||||
Accessible.role: Accessible.Button
|
||||
Accessible.name: control.text
|
||||
Accessible.description: contentDescription
|
||||
Accessible.onPressAction: control.clicked()
|
||||
id: control
|
||||
rightPadding:35
|
||||
enabled: !disabled
|
||||
focusPolicy:Qt.TabFocus
|
||||
verticalPadding: 0
|
||||
horizontalPadding:12
|
||||
background: Rectangle{
|
||||
implicitWidth: 28
|
||||
implicitHeight: 28
|
||||
border.color: FluTheme.dark ? "#505050" : "#DFDFDF"
|
||||
border.width: 1
|
||||
radius: 4
|
||||
FluFocusRectangle{
|
||||
visible: control.activeFocus
|
||||
radius:8
|
||||
}
|
||||
color:{
|
||||
if(!enabled){
|
||||
return disableColor
|
||||
}
|
||||
return hovered ? hoverColor :normalColor
|
||||
}
|
||||
FluIcon{
|
||||
iconSource:FluentIcons.ChevronDown
|
||||
iconSize: 15
|
||||
@ -18,7 +65,14 @@ FluButton {
|
||||
rightMargin: 10
|
||||
verticalCenter: parent.verticalCenter
|
||||
}
|
||||
iconColor:control.textColor
|
||||
iconColor:title.color
|
||||
}
|
||||
}
|
||||
contentItem: FluText {
|
||||
id:title
|
||||
text: control.text
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
color: control.textColor
|
||||
}
|
||||
onClicked: {
|
||||
if(menu.count !==0){
|
||||
|
@ -26,8 +26,8 @@ Item {
|
||||
width: parent.width
|
||||
height: 45
|
||||
radius: 4
|
||||
border.color: FluTheme.dividerColor
|
||||
color: FluTheme.dark ? Window.active ? Qt.rgba(39/255,39/255,39/255,1) : Qt.rgba(39/255,39/255,39/255,1) : Qt.rgba(251/255,251/255,253/255,1)
|
||||
color: FluTheme.dark ? Window.active ? Qt.rgba(38/255,44/255,54/255,1) : Qt.rgba(39/255,39/255,39/255,1) : Qt.rgba(251/255,251/255,253/255,1)
|
||||
border.color: FluTheme.dark ? Window.active ? Qt.rgba(55/255,55/255,55/255,1) : Qt.rgba(45/255,45/255,45/255,1) : Qt.rgba(226/255,229/255,234/255,1)
|
||||
MouseArea{
|
||||
id:control_mouse
|
||||
anchors.fill: parent
|
||||
@ -90,7 +90,7 @@ Item {
|
||||
radius: 4
|
||||
clip: true
|
||||
color: FluTheme.dark ? Qt.rgba(39/255,39/255,39/255,1) : Qt.rgba(251/255,251/255,253/255,1)
|
||||
border.color: FluTheme.dividerColor
|
||||
border.color: FluTheme.dark ? Qt.rgba(45/255,45/255,45/255,1) : Qt.rgba(226/255,229/255,234/255,1)
|
||||
anchors.topMargin: -contentHeight
|
||||
states: [
|
||||
State{
|
||||
|
@ -30,13 +30,27 @@ Button {
|
||||
font:FluTextStyle.Body
|
||||
verticalPadding: 0
|
||||
horizontalPadding:12
|
||||
background: FluControlBackground{
|
||||
implicitWidth: 30
|
||||
implicitHeight: 30
|
||||
background: Rectangle{
|
||||
implicitWidth: 28
|
||||
implicitHeight: 28
|
||||
radius: 4
|
||||
bottomMargin: enabled ? 2 : 0
|
||||
border.width: enabled ? 1 : 0
|
||||
border.color: enabled ? Qt.darker(control.normalColor,1.2) : disableColor
|
||||
FluFocusRectangle{
|
||||
visible: control.visualFocus
|
||||
radius:4
|
||||
}
|
||||
gradient: Gradient {
|
||||
GradientStop { position: 0.33; color: control.enabled ? control.normalColor : Qt.rgba(0,0,0,0) }
|
||||
GradientStop { position: 1.0; color: control.enabled ? Qt.darker(control.normalColor,1.3) : Qt.rgba(0,0,0,0) }
|
||||
}
|
||||
Rectangle{
|
||||
radius: parent.radius
|
||||
anchors{
|
||||
fill: parent
|
||||
topMargin: control.enabled ? 0 : 0
|
||||
leftMargin: control.enabled ? 1 : 0
|
||||
rightMargin: control.enabled ? 1 : 0
|
||||
bottomMargin: control.enabled ? 2 : 0
|
||||
}
|
||||
color:{
|
||||
if(!enabled){
|
||||
return disableColor
|
||||
@ -46,9 +60,6 @@ Button {
|
||||
}
|
||||
return hovered ? hoverColor :normalColor
|
||||
}
|
||||
FluFocusRectangle{
|
||||
visible: control.visualFocus
|
||||
radius:4
|
||||
}
|
||||
}
|
||||
contentItem: FluText {
|
||||
|
@ -16,7 +16,7 @@ T.Frame {
|
||||
background: Rectangle {
|
||||
id:d
|
||||
radius: 4
|
||||
border.color: FluTheme.dividerColor
|
||||
color: FluTheme.dark ? Window.active ? Qt.rgba(39/255,39/255,39/255,1) : Qt.rgba(45/255,45/255,45/255,1) : Qt.rgba(251/255,251/255,253/255,1)
|
||||
border.color: FluTheme.dark ? Window.active ? Qt.rgba(55/255,55/255,55/255,1):Qt.rgba(45/255,45/255,45/255,1) : Qt.rgba(226/255,229/255,234/255,1)
|
||||
color: FluTheme.dark ? Window.active ? Qt.rgba(38/255,44/255,54/255,1) : Qt.rgba(39/255,39/255,39/255,1) : Qt.rgba(251/255,251/255,253/255,1)
|
||||
}
|
||||
}
|
||||
|
@ -51,9 +51,9 @@ T.Menu {
|
||||
FluShadow{}
|
||||
}
|
||||
T.Overlay.modal: Rectangle {
|
||||
color: FluTools.withOpacity(control.palette.shadow, 0.5)
|
||||
color: Color.transparent(control.palette.shadow, 0.5)
|
||||
}
|
||||
T.Overlay.modeless: Rectangle {
|
||||
color: FluTools.withOpacity(control.palette.shadow, 0.12)
|
||||
color: Color.transparent(control.palette.shadow, 0.12)
|
||||
}
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ TextArea{
|
||||
leftPadding: padding+4
|
||||
renderType: FluTheme.nativeText ? Text.NativeRendering : Text.QtRendering
|
||||
selectedTextColor: color
|
||||
selectionColor: FluTools.withOpacity(FluTheme.primaryColor,0.5)
|
||||
selectionColor: FluTools.colorAlpha(FluTheme.primaryColor,0.5)
|
||||
placeholderTextColor: {
|
||||
if(!enabled){
|
||||
return placeholderDisableColor
|
||||
|
@ -26,7 +26,7 @@ TextField{
|
||||
leftPadding: padding+4
|
||||
echoMode:btn_reveal.pressed ? TextField.Normal : TextField.Password
|
||||
renderType: FluTheme.nativeText ? Text.NativeRendering : Text.QtRendering
|
||||
selectionColor: FluTools.withOpacity(FluTheme.primaryColor,0.5)
|
||||
selectionColor: FluTools.colorAlpha(FluTheme.primaryColor,0.5)
|
||||
selectedTextColor: color
|
||||
placeholderTextColor: {
|
||||
if(!enabled){
|
||||
|
@ -8,18 +8,19 @@ Page {
|
||||
property alias currentIndex: nav_list.currentIndex
|
||||
property color textNormalColor: FluTheme.dark ? FluColors.Grey120 : FluColors.Grey120
|
||||
property color textHoverColor: FluTheme.dark ? FluColors.Grey10 : FluColors.Black
|
||||
property int textSize: 28
|
||||
property bool textBold: true
|
||||
property int textSpacing: 10
|
||||
property int headerSpacing: 20
|
||||
property int headerHeight: 40
|
||||
id:control
|
||||
width: 400
|
||||
height: 300
|
||||
font: FluTextStyle.Title
|
||||
implicitHeight: height
|
||||
implicitWidth: width
|
||||
FluObject{
|
||||
id:d
|
||||
property int tabY: control.headerHeight/2+control.font.pixelSize/2 + 3
|
||||
property int tabY: control.headerHeight/2+control.textSize/2 + 3
|
||||
}
|
||||
background:Item{}
|
||||
header:ListView{
|
||||
@ -65,9 +66,10 @@ Page {
|
||||
id:item_title
|
||||
text: modelData.title
|
||||
anchors.centerIn: parent
|
||||
font: control.font
|
||||
font.pixelSize: control.textSize
|
||||
font.bold: control.textBold
|
||||
color: {
|
||||
if(item_button.hovered)
|
||||
if(item_button.hovered || nav_list.currentIndex === index)
|
||||
return textHoverColor
|
||||
return textNormalColor
|
||||
}
|
||||
|
@ -3,13 +3,14 @@ import QtQuick.Controls
|
||||
import QtQuick.Controls.Basic
|
||||
import FluentUI
|
||||
|
||||
FluButton {
|
||||
Button {
|
||||
property real progress
|
||||
property bool disabled: false
|
||||
property string contentDescription: ""
|
||||
QtObject{
|
||||
id:d
|
||||
property bool checked: (Number(rect_back.height) === Number(background.height)) && (progress === 1)
|
||||
property bool checked: (rect_back.height === background.height) && (progress === 1)
|
||||
}
|
||||
id: control
|
||||
property color normalColor: {
|
||||
if(d.checked){
|
||||
return FluTheme.primaryColor
|
||||
@ -32,12 +33,24 @@ FluButton {
|
||||
}
|
||||
}
|
||||
property color pressedColor: FluTheme.dark ? Qt.darker(normalColor,1.2) : Qt.lighter(normalColor,1.2)
|
||||
background: FluControlBackground{
|
||||
implicitWidth: 30
|
||||
implicitHeight: 30
|
||||
radius: 4
|
||||
border.color: FluTheme.dark ? Qt.rgba(48/255,48/255,48/255,1) : Qt.rgba(188/255,188/255,188/255,1)
|
||||
Accessible.role: Accessible.Button
|
||||
Accessible.name: control.text
|
||||
Accessible.description: contentDescription
|
||||
Accessible.onPressAction: control.clicked()
|
||||
focusPolicy:Qt.TabFocus
|
||||
id: control
|
||||
enabled: !disabled
|
||||
verticalPadding: 0
|
||||
horizontalPadding:12
|
||||
background: FluClip{
|
||||
implicitWidth: 28
|
||||
implicitHeight: 28
|
||||
radius: [4,4,4,4]
|
||||
Rectangle{
|
||||
anchors.fill: parent
|
||||
border.color: FluTheme.dark ? "#505050" : "#DFDFDF"
|
||||
border.width: d.checked ? 0 : 1
|
||||
radius: 4
|
||||
color:{
|
||||
if(!enabled){
|
||||
return disableColor
|
||||
@ -49,9 +62,7 @@ FluButton {
|
||||
}
|
||||
return hovered ? hoverColor :normalColor
|
||||
}
|
||||
FluClip{
|
||||
anchors.fill: parent
|
||||
radius: [4,4,4,4]
|
||||
}
|
||||
Rectangle{
|
||||
id:rect_back
|
||||
width: parent.width * control.progress
|
||||
@ -78,7 +89,6 @@ FluButton {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
FluFocusRectangle{
|
||||
visible: control.activeFocus
|
||||
radius:4
|
||||
|
@ -131,9 +131,10 @@ FluIconButton {
|
||||
width: Math.max(item_text.implicitWidth+12,28)
|
||||
height: Math.max(item_text.implicitHeight,28)
|
||||
radius: 4
|
||||
FluText{
|
||||
Text{
|
||||
id:item_text
|
||||
color: FluTheme.dark ? Qt.rgba(0,0,0,1) : Qt.rgba(1,1,1,1)
|
||||
font.pixelSize: 13
|
||||
text: keyText
|
||||
anchors.centerIn: parent
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ T.SpinBox {
|
||||
}
|
||||
return normalColor
|
||||
}
|
||||
selectionColor: FluTools.withOpacity(FluTheme.primaryColor,0.5)
|
||||
selectionColor: FluTools.colorAlpha(FluTheme.primaryColor,0.5)
|
||||
selectedTextColor: color
|
||||
horizontalAlignment: Qt.AlignHCenter
|
||||
verticalAlignment: Qt.AlignVCenter
|
||||
|
@ -16,7 +16,7 @@ Rectangle {
|
||||
property bool horizonalHeaderVisible: true
|
||||
property bool verticalHeaderVisible: true
|
||||
property color selectedBorderColor: FluTheme.primaryColor
|
||||
property color selectedColor: FluTools.withOpacity(FluTheme.primaryColor,0.3)
|
||||
property color selectedColor: FluTools.colorAlpha(FluTheme.primaryColor,0.3)
|
||||
id:control
|
||||
color: FluTheme.dark ? Qt.rgba(39/255,39/255,39/255,1) : Qt.rgba(251/255,251/255,253/255,1)
|
||||
onColumnSourceChanged: {
|
||||
|
@ -26,7 +26,7 @@ TextField{
|
||||
}
|
||||
font:FluTextStyle.Body
|
||||
renderType: FluTheme.nativeText ? Text.NativeRendering : Text.QtRendering
|
||||
selectionColor: FluTools.withOpacity(FluTheme.primaryColor,0.5)
|
||||
selectionColor: FluTools.colorAlpha(FluTheme.primaryColor,0.5)
|
||||
selectedTextColor: color
|
||||
placeholderTextColor: {
|
||||
if(!enabled){
|
||||
|
@ -2,9 +2,14 @@ import QtQuick
|
||||
import QtQuick.Controls
|
||||
import FluentUI
|
||||
|
||||
FluControlBackground{
|
||||
FluClip{
|
||||
property Item inputItem
|
||||
property int borderWidth: 1
|
||||
id:control
|
||||
radius: [4,4,4,4]
|
||||
Rectangle{
|
||||
radius: 4
|
||||
anchors.fill: parent
|
||||
color: {
|
||||
if(inputItem && inputItem.disabled){
|
||||
return FluTheme.dark ? Qt.rgba(59/255,59/255,59/255,1) : Qt.rgba(252/255,252/255,252/255,1)
|
||||
@ -17,22 +22,35 @@ FluControlBackground{
|
||||
}
|
||||
return FluTheme.dark ? Qt.rgba(62/255,62/255,62/255,1) : Qt.rgba(1,1,1,1)
|
||||
}
|
||||
border.width: 1
|
||||
gradient: Gradient {
|
||||
GradientStop { position: 0.0; color: d.startColor }
|
||||
GradientStop { position: d.position; color: d.startColor }
|
||||
GradientStop { position: 1.0; color: d.endColor }
|
||||
border.width: control.borderWidth
|
||||
border.color: {
|
||||
if(inputItem && inputItem.disabled){
|
||||
return FluTheme.dark ? Qt.rgba(73/255,73/255,73/255,1) : Qt.rgba(237/255,237/255,237/255,1)
|
||||
}
|
||||
bottomMargin: inputItem && inputItem.activeFocus ? 2 : 1
|
||||
QtObject{
|
||||
id:d
|
||||
property real position: 1 - 3/control.height
|
||||
property color startColor: FluTheme.dark ? Qt.rgba(66/255,66/255,66/255,1) : Qt.rgba(232/255,232/255,232/255,1)
|
||||
property color endColor: {
|
||||
if(!control.enabled){
|
||||
return d.startColor
|
||||
return FluTheme.dark ? Qt.rgba(76/255,76/255,76/255,1) : Qt.rgba(240/255,240/255,240/255,1)
|
||||
}
|
||||
}
|
||||
Rectangle{
|
||||
width: parent.width
|
||||
height: inputItem && inputItem.activeFocus ? 2 : 1
|
||||
anchors.bottom: parent.bottom
|
||||
visible: !(inputItem && inputItem.disabled)
|
||||
color: {
|
||||
if(inputItem && inputItem.activeFocus){
|
||||
return FluTheme.primaryColor
|
||||
}
|
||||
if(FluTheme.dark){
|
||||
return Qt.rgba(166/255,166/255,166/255,1)
|
||||
}else{
|
||||
return Qt.rgba(134/255,134/255,134/255,1)
|
||||
}
|
||||
}
|
||||
Behavior on height{
|
||||
enabled: FluTheme.animationEnabled
|
||||
NumberAnimation{
|
||||
duration: 83
|
||||
easing.type: Easing.OutCubic
|
||||
}
|
||||
return inputItem && inputItem.activeFocus ? FluTheme.primaryColor : FluTheme.dark ? Qt.rgba(123/255,123/255,123/255,1) : Qt.rgba(132/255,132/255,132/255,1)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -29,8 +29,8 @@ Button {
|
||||
enabled: !disabled
|
||||
font:FluTextStyle.Body
|
||||
background: Rectangle{
|
||||
implicitWidth: 30
|
||||
implicitHeight: 30
|
||||
implicitWidth: 28
|
||||
implicitHeight: 28
|
||||
radius: 4
|
||||
color: {
|
||||
if(!enabled){
|
||||
|
@ -58,14 +58,14 @@ FluButton {
|
||||
id: divider_1
|
||||
width: 1
|
||||
x: isH ? parent.width/3 : parent.width/2
|
||||
height: parent.height-1
|
||||
height: parent.height
|
||||
color: dividerColor
|
||||
}
|
||||
Rectangle{
|
||||
id: divider_2
|
||||
width: 1
|
||||
x: parent.width*2/3
|
||||
height: parent.height-1
|
||||
height: parent.height
|
||||
color: dividerColor
|
||||
visible: isH
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ Button {
|
||||
if(checked){
|
||||
return FluTheme.dark ? Qt.rgba(82/255,82/255,82/255,1) : Qt.rgba(199/255,199/255,199/255,1)
|
||||
}else{
|
||||
return FluTheme.dark ? Qt.rgba(59/255,59/255,59/255,1) : Qt.rgba(251/255,251/255,251/255,1)
|
||||
return FluTheme.dark ? Qt.rgba(59/255,59/255,59/255,1) : Qt.rgba(244/255,244/255,244/255,1)
|
||||
}
|
||||
}
|
||||
property var clickListener : function(){
|
||||
@ -41,14 +41,27 @@ Button {
|
||||
verticalPadding: 0
|
||||
horizontalPadding:12
|
||||
onClicked: clickListener()
|
||||
background: FluControlBackground{
|
||||
implicitWidth: 30
|
||||
implicitHeight: 30
|
||||
background: Rectangle{
|
||||
implicitWidth: 28
|
||||
implicitHeight: 28
|
||||
radius: 4
|
||||
FluFocusRectangle{
|
||||
visible: control.activeFocus
|
||||
radius:4
|
||||
}
|
||||
gradient: Gradient {
|
||||
GradientStop { position: 0.33; color: control.enabled ? control.normalColor : Qt.rgba(0,0,0,0) }
|
||||
GradientStop { position: 1.0; color: control.enabled ? Qt.darker(control.normalColor,1.3) : Qt.rgba(0,0,0,0) }
|
||||
}
|
||||
Rectangle{
|
||||
radius: parent.radius
|
||||
anchors{
|
||||
fill: parent
|
||||
topMargin: checked && enabled ? 0 : 0
|
||||
leftMargin: checked && enabled ? 1 : 0
|
||||
rightMargin: checked && enabled ? 1 : 0
|
||||
bottomMargin: checked && enabled ? 2 : 0
|
||||
}
|
||||
color:{
|
||||
if(!enabled){
|
||||
return disableColor
|
||||
@ -60,33 +73,13 @@ Button {
|
||||
}
|
||||
return hovered ? hoverColor :normalColor
|
||||
}
|
||||
bottomMargin: {
|
||||
if(checked){
|
||||
return enabled ? 2 : 0
|
||||
}else{
|
||||
return 1
|
||||
}
|
||||
}
|
||||
border.width: {
|
||||
if(checked){
|
||||
return enabled ? 1 : 0
|
||||
}else{
|
||||
return 1
|
||||
}
|
||||
}
|
||||
shadow: {
|
||||
if(checked){
|
||||
return true
|
||||
}else{
|
||||
return !pressed && enabled
|
||||
}
|
||||
}
|
||||
border.color: {
|
||||
if(checked){
|
||||
return enabled ? Qt.darker(control.normalColor,1.2) : disableColor
|
||||
}else{
|
||||
return FluTheme.dark ? Qt.rgba(48/255,48/255,48/255,1) : Qt.rgba(188/255,188/255,188/255,1)
|
||||
}
|
||||
Rectangle{
|
||||
color:"#00000000"
|
||||
anchors.fill: parent
|
||||
border.color: FluTheme.dark ? "#505050" : "#DFDFDF"
|
||||
border.width: checked ? 0 : 1
|
||||
radius: parent.radius
|
||||
}
|
||||
}
|
||||
contentItem: FluText {
|
||||
|
@ -42,9 +42,9 @@ Window {
|
||||
property bool useSystemAppBar
|
||||
property color resizeBorderColor: {
|
||||
if(window.active){
|
||||
return FluTheme.dark ? Qt.rgba(51/255,51/255,51/255,1) : Qt.rgba(110/255,110/255,110/255,1)
|
||||
return FluTheme.dark ? "#333333" : "#6E6E6E"
|
||||
}
|
||||
return FluTheme.dark ? Qt.rgba(61/255,61/255,61/255,1) : Qt.rgba(167/255,167/255,167/255,1)
|
||||
return FluTheme.dark ? "#3D3D3E" : "#A7A7A7"
|
||||
}
|
||||
property int resizeBorderWidth: 1
|
||||
property var closeListener: function(event){
|
||||
|
Loading…
Reference in New Issue
Block a user