Update icons

pull/18/head
reionwong 4 years ago
parent 8b22d4b946
commit 4ba4b7614f

@ -267,12 +267,15 @@ ControlCenterDialog {
RowLayout {
anchors.fill: brightnessItemBg
anchors.margins: FishUI.Units.largeSpacing
anchors.leftMargin: FishUI.Units.largeSpacing
anchors.rightMargin: FishUI.Units.largeSpacing
anchors.topMargin: FishUI.Units.smallSpacing
anchors.bottomMargin: FishUI.Units.smallSpacing
spacing: FishUI.Units.largeSpacing
Image {
width: parent.height * 0.8
height: parent.height * 0.8
height: 16
width: height
sourceSize: Qt.size(width, height)
source: "qrc:/images/" + (FishUI.Theme.darkMode ? "dark" : "light") + "/brightness.svg"
smooth: false
@ -316,12 +319,15 @@ ControlCenterDialog {
RowLayout {
anchors.fill: volumeItemBg
anchors.margins: FishUI.Units.largeSpacing
anchors.leftMargin: FishUI.Units.largeSpacing
anchors.rightMargin: FishUI.Units.largeSpacing
anchors.topMargin: FishUI.Units.smallSpacing
anchors.bottomMargin: FishUI.Units.smallSpacing
spacing: FishUI.Units.largeSpacing
Image {
width: parent.height * 0.8
height: parent.height * 0.8
height: 16
width: height
sourceSize: Qt.size(width, height)
source: "qrc:/images/" + (FishUI.Theme.darkMode ? "dark" : "light") + "/" + volume.iconName + ".svg"
smooth: false

@ -345,47 +345,15 @@ Item {
}
}
// Image {
// id: shutdownIcon
// width: rootItem.iconSize
// height: width
// sourceSize: Qt.size(width, height)
// source: "qrc:/images/" + (rootItem.darkMode ? "dark/" : "light/") + "system-shutdown-symbolic.svg"
// asynchronous: true
// Layout.alignment: Qt.AlignCenter
// visible: !volumeIcon.visible && !batteryIcon.visible && !wirelessIcon.visible
// antialiasing: true
// smooth: false
// }
}
}
StandardItem {
id: shutdownItem
visible: !batteryIcon.visible
animationEnabled: true
Layout.fillHeight: true
Layout.preferredWidth: shutdownLayout.implicitWidth + FishUI.Units.largeSpacing
onClicked: process.startDetached("cutefish-shutdown")
RowLayout {
id: shutdownLayout
anchors.fill: parent
anchors.leftMargin: FishUI.Units.smallSpacing
anchors.rightMargin: FishUI.Units.smallSpacing
spacing: 0
Image {
id: _shutdownIcon
source: "qrc:/images/" + (rootItem.darkMode ? "dark/" : "light/") + "system-shutdown-symbolic.svg"
id: shutdownIcon
width: rootItem.iconSize
height: width
sourceSize: Qt.size(width, height)
source: "qrc:/images/" + (rootItem.darkMode ? "dark/" : "light/") + "system-shutdown-symbolic.svg"
asynchronous: true
Layout.alignment: Qt.AlignCenter
visible: !batteryIcon.visible
antialiasing: true
smooth: false
}

@ -43,19 +43,19 @@ static const QByteArray s_x11AppMenuObjectPathPropertyName = QByteArrayLiteral("
AppMenu::AppMenu(QObject *parent)
: QObject(parent)
, m_appmenuDBus(new AppmenuDBus(this))
// , m_appmenuDBus(new AppmenuDBus(this))
{
reconfigure();
m_appmenuDBus->connectToBus();
// m_appmenuDBus->connectToBus();
connect(m_appmenuDBus, &AppmenuDBus::appShowMenu, this, &AppMenu::slotShowMenu);
connect(m_appmenuDBus, &AppmenuDBus::reconfigured, this, &AppMenu::reconfigure);
// connect(m_appmenuDBus, &AppmenuDBus::appShowMenu, this, &AppMenu::slotShowMenu);
// connect(m_appmenuDBus, &AppmenuDBus::reconfigured, this, &AppMenu::reconfigure);
// transfer our signals to dbus
connect(this, &AppMenu::showRequest, m_appmenuDBus, &AppmenuDBus::showRequest);
connect(this, &AppMenu::menuHidden, m_appmenuDBus, &AppmenuDBus::menuHidden);
connect(this, &AppMenu::menuShown, m_appmenuDBus, &AppmenuDBus::menuShown);
// // transfer our signals to dbus
// connect(this, &AppMenu::showRequest, m_appmenuDBus, &AppmenuDBus::showRequest);
// connect(this, &AppMenu::menuHidden, m_appmenuDBus, &AppmenuDBus::menuHidden);
// connect(this, &AppMenu::menuShown, m_appmenuDBus, &AppmenuDBus::menuShown);
m_menuViewWatcher = new QDBusServiceWatcher(QStringLiteral("com.cutefish.cappmenuview"),
QDBusConnection::sessionBus(),

@ -44,11 +44,11 @@ AppMenuApplet::AppMenuApplet(QObject *parent)
{
++s_refs;
// if we're the first, register the service
if (s_refs == 1) {
QDBusConnection::sessionBus().interface()->registerService(viewService(),
QDBusConnectionInterface::QueueService,
QDBusConnectionInterface::DontAllowReplacement);
}
// if (s_refs == 1) {
// QDBusConnection::sessionBus().interface()->registerService(viewService(),
// QDBusConnectionInterface::QueueService,
// QDBusConnectionInterface::DontAllowReplacement);
// }
/*it registers or unregisters the service when the destroyed value of the applet change,
and not in the dtor, because:
when we "delete" an applet, it just hides it for about a minute setting its status

Loading…
Cancel
Save