mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2024-11-26 21:37:04 +08:00
update
This commit is contained in:
parent
cb8b128598
commit
64728632c7
@ -16,10 +16,7 @@ FluScrollablePage{
|
|||||||
Layout.topMargin: 20
|
Layout.topMargin: 20
|
||||||
|
|
||||||
FluFilledButton{
|
FluFilledButton{
|
||||||
anchors{
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
top: parent.top
|
|
||||||
topMargin: 14
|
|
||||||
}
|
|
||||||
text:"Open Screenshot"
|
text:"Open Screenshot"
|
||||||
onClicked: {
|
onClicked: {
|
||||||
screenshot.open()
|
screenshot.open()
|
||||||
@ -27,13 +24,23 @@ FluScrollablePage{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Image{
|
Rectangle{
|
||||||
id:image
|
|
||||||
Layout.preferredHeight: 400
|
Layout.preferredHeight: 400
|
||||||
Layout.preferredWidth: 400
|
Layout.preferredWidth: 400
|
||||||
|
Layout.topMargin: 10
|
||||||
|
Layout.leftMargin: 4
|
||||||
|
color: FluTheme.dark ? FluColors.Black : FluColors.White
|
||||||
|
FluShadow{
|
||||||
|
radius: 0
|
||||||
|
color: FluTheme.primaryColor.dark
|
||||||
|
}
|
||||||
|
Image{
|
||||||
|
id:image
|
||||||
|
anchors.fill: parent
|
||||||
fillMode: Image.PreserveAspectFit
|
fillMode: Image.PreserveAspectFit
|
||||||
asynchronous: true
|
asynchronous: true
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
FluScreenshot{
|
FluScreenshot{
|
||||||
id:screenshot
|
id:screenshot
|
||||||
@ -41,8 +48,6 @@ FluScrollablePage{
|
|||||||
saveFolder: FluTools.getApplicationDirPath()+"/screenshot"
|
saveFolder: FluTools.getApplicationDirPath()+"/screenshot"
|
||||||
onCaptrueCompleted:
|
onCaptrueCompleted:
|
||||||
(captrue)=>{
|
(captrue)=>{
|
||||||
|
|
||||||
//C:/Users/zhuzi/Pictures/1692283885126.png
|
|
||||||
image.source = captrue
|
image.source = captrue
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -13,6 +13,7 @@ FluColors *FluColors::getInstance()
|
|||||||
FluColors::FluColors(QObject *parent)
|
FluColors::FluColors(QObject *parent)
|
||||||
: QObject{parent}
|
: QObject{parent}
|
||||||
{
|
{
|
||||||
|
Transparent("#00000000");
|
||||||
Black("#000000");
|
Black("#000000");
|
||||||
White("#ffffff");
|
White("#ffffff");
|
||||||
Grey10("#faf9f8");
|
Grey10("#faf9f8");
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
class FluColors : public QObject
|
class FluColors : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
Q_PROPERTY_AUTO(QString,Transparent);
|
||||||
Q_PROPERTY_AUTO(QString,Black);
|
Q_PROPERTY_AUTO(QString,Black);
|
||||||
Q_PROPERTY_AUTO(QString,White);
|
Q_PROPERTY_AUTO(QString,White);
|
||||||
Q_PROPERTY_AUTO(QString,Grey10);
|
Q_PROPERTY_AUTO(QString,Grey10);
|
||||||
|
@ -119,3 +119,7 @@ QRect FluTools::getVirtualGeometry(){
|
|||||||
QString FluTools::getApplicationDirPath(){
|
QString FluTools::getApplicationDirPath(){
|
||||||
return qApp->applicationDirPath();
|
return qApp->applicationDirPath();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QUrl FluTools::getUrlByFilePath(const QString& path){
|
||||||
|
return QUrl::fromLocalFile(path);
|
||||||
|
}
|
||||||
|
@ -122,8 +122,19 @@ public:
|
|||||||
*/
|
*/
|
||||||
Q_INVOKABLE QRect getVirtualGeometry();
|
Q_INVOKABLE QRect getVirtualGeometry();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief getApplicationDirPath
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
Q_INVOKABLE QString getApplicationDirPath();
|
Q_INVOKABLE QString getApplicationDirPath();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief getUrlByFilePath
|
||||||
|
* @param path
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Q_INVOKABLE QUrl getUrlByFilePath(const QString& path);
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user