forked from quickshell/quickshell
ui: add native reload popup
This commit is contained in:
parent
5c1d600e84
commit
8124a63ee4
13 changed files with 475 additions and 4 deletions
|
@ -173,6 +173,14 @@ public:
|
|||
Q_INVOKABLE [[nodiscard]] QString statePath(const QString& path) const;
|
||||
/// Equivalent to `${Quickshell.cacheDir}/${path}`
|
||||
Q_INVOKABLE [[nodiscard]] QString cachePath(const QString& path) const;
|
||||
/// When called from @@reloadCompleted() or @@reloadFailed(), prevents the
|
||||
/// default reload popup from displaying.
|
||||
///
|
||||
/// The popup can also be blocked by setting `QS_NO_RELOAD_POPUP=1`.
|
||||
Q_INVOKABLE void inhibitReloadPopup() { this->mInhibitReloadPopup = true; }
|
||||
|
||||
void clearReloadPopupInhibit() { this->mInhibitReloadPopup = false; }
|
||||
[[nodiscard]] bool isReloadPopupInhibited() const { return this->mInhibitReloadPopup; }
|
||||
|
||||
[[nodiscard]] QString shellRoot() const;
|
||||
|
||||
|
@ -212,6 +220,8 @@ private slots:
|
|||
private:
|
||||
QuickshellGlobal(QObject* parent = nullptr);
|
||||
|
||||
bool mInhibitReloadPopup = false;
|
||||
|
||||
static qsizetype screensCount(QQmlListProperty<QuickshellScreenInfo>* prop);
|
||||
static QuickshellScreenInfo* screenAt(QQmlListProperty<QuickshellScreenInfo>* prop, qsizetype i);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue