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();
list.append(QVariant(bg));
}
std::sort(list.begin(), list.end());
return list;
}

@ -19,10 +19,15 @@
#include "application.h"
#include <QDebug>
#include <QIcon>
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);
app.setWindowIcon(QIcon::fromTheme("cutefish-settings"));
return 0;
}

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

@ -17,7 +17,7 @@
* 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.Window 2.12
import QtQuick.Layouts 1.12
@ -28,9 +28,11 @@ FishUI.Window {
title: "Hello World"
width: 900
height: 600
minimumWidth: 800
minimumHeight: 500
visible: false
background.opacity: 0.5
background.opacity: control.compositing ? 0.5 : 1.0
contentTopMargin: 0
onWidthChanged: control.reset()
@ -63,6 +65,17 @@ FishUI.Window {
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 {
anchors.fill: parent
anchors.margins: FishUI.Units.largeSpacing
@ -118,7 +131,7 @@ FishUI.Window {
MouseArea {
anchors.fill: parent
onPressed: {
onClicked: {
timeZoneMap.clicked(mouse.x, mouse.y, _worldMap.width, _worldMap.height)
dot.show(mouse.x, mouse.y)

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

Loading…
Cancel
Save