Set window icon

pull/27/head
reionwong 4 years ago
parent a7815d1ddb
commit f670515d91

@ -9,6 +9,7 @@ static QVariantList getBackgroundPaths()
QString bg = it.next(); QString bg = it.next();
list.append(QVariant(bg)); list.append(QVariant(bg));
} }
std::sort(list.begin(), list.end());
return list; return list;
} }

@ -19,10 +19,15 @@
#include "application.h" #include "application.h"
#include <QDebug> #include <QDebug>
#include <QIcon>
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps, true);
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling, true);
Application app(argc, argv); Application app(argc, argv);
app.setWindowIcon(QIcon::fromTheme("cutefish-settings"));
return 0; return 0;
} }

@ -41,7 +41,7 @@ ItemPage {
id: layout id: layout
anchors.fill: parent anchors.fill: parent
// anchors.bottomMargin: FishUI.Units.largeSpacing // anchors.bottomMargin: FishUI.Units.largeSpacing
spacing: FishUI.Units.largeSpacing * 2 spacing: FishUI.Units.largeSpacing
RoundedItem { RoundedItem {
Label { Label {
@ -76,6 +76,7 @@ ItemPage {
Label { Label {
id: dimsTipsLabel id: dimsTipsLabel
text: qsTr("Dim the wallpaper in dark theme") text: qsTr("Dim the wallpaper in dark theme")
bottomPadding: FishUI.Units.smallSpacing
Layout.alignment: Qt.AlignVCenter | Qt.AlignLeft Layout.alignment: Qt.AlignVCenter | Qt.AlignLeft
} }

@ -17,7 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
import QtQuick 2.0 import QtQuick 2.12
import QtQuick.Controls 2.12 import QtQuick.Controls 2.12
import QtQuick.Window 2.12 import QtQuick.Window 2.12
import QtQuick.Layouts 1.12 import QtQuick.Layouts 1.12
@ -28,9 +28,11 @@ FishUI.Window {
title: "Hello World" title: "Hello World"
width: 900 width: 900
height: 600 height: 600
minimumWidth: 800
minimumHeight: 500
visible: false visible: false
background.opacity: 0.5 background.opacity: control.compositing ? 0.5 : 1.0
contentTopMargin: 0 contentTopMargin: 0
onWidthChanged: control.reset() onWidthChanged: control.reset()
@ -63,6 +65,17 @@ FishUI.Window {
enabled: true enabled: true
} }
Item {
z: -1
anchors.fill: parent
DragHandler {
acceptedDevices: PointerDevice.GenericPointer
grabPermissions: PointerHandler.CanTakeOverFromItems | PointerHandler.CanTakeOverFromHandlersOfDifferentType | PointerHandler.ApprovesTakeOverByAnything
onActiveChanged: if (active) control.helper.startSystemMove(control)
}
}
ColumnLayout { ColumnLayout {
anchors.fill: parent anchors.fill: parent
anchors.margins: FishUI.Units.largeSpacing anchors.margins: FishUI.Units.largeSpacing
@ -118,7 +131,7 @@ FishUI.Window {
MouseArea { MouseArea {
anchors.fill: parent anchors.fill: parent
onPressed: { onClicked: {
timeZoneMap.clicked(mouse.x, mouse.y, _worldMap.width, _worldMap.height) timeZoneMap.clicked(mouse.x, mouse.y, _worldMap.width, _worldMap.height)
dot.show(mouse.x, mouse.y) dot.show(mouse.x, mouse.y)

@ -86,7 +86,7 @@ ItemPage {
columns: 2 columns: 2
columnSpacing: FishUI.Units.largeSpacing * 1.5 columnSpacing: FishUI.Units.largeSpacing * 1.5
rowSpacing: FishUI.Units.largeSpacing * 2 rowSpacing: FishUI.Units.largeSpacing * 1.5
Label { Label {
text: qsTr("General Font") text: qsTr("General Font")

Loading…
Cancel
Save