Members of the KDE Community are recommended to subscribe to the kde-community mailing list at to allow them to participate in important discussions and receive other important announcements

Commit 5779dde8 authored by Michail Vourlakos's avatar Michail Vourlakos

global menu,rename menuHidden to visible

--as @mart requested we can rename "menuHidden" property
to "visible" in order to follow Qt naming

Test Plan:
--check that global menu applet is functioning the same
way as when using removed menuHidden property

Reviewers: #plasma, mart, davidedmundson

Reviewed By: #plasma, mart

Subscribers: mart, plasma-devel

Tags: #plasma

Differential Revision:
parent 3fa1cc6b
......@@ -104,7 +104,7 @@ Item {
Repeater {
id: buttonRepeater
model: !appMenuModel.menuHidden ? appMenuModel : null
model: appMenuModel.visible ? appMenuModel : null
PlasmaComponents.ToolButton {
readonly property int buttonIndex: index
......@@ -110,21 +110,21 @@ void AppMenuModel::setMenuAvailable(bool set)
if (m_menuAvailable != set) {
m_menuAvailable = set;
emit menuAvailableChanged();
bool AppMenuModel::menuHidden() const
bool AppMenuModel::visible() const
return m_menuHidden;
return m_visible;
void AppMenuModel::setMenuHidden(bool hide)
void AppMenuModel::setVisible(bool visible)
if (m_menuHidden != hide) {
m_menuHidden = hide;
emit menuHiddenChanged();
if (m_visible != visible) {
m_visible = visible;
emit visibleChanged();
......@@ -232,14 +232,14 @@ void AppMenuModel::onActiveWindowChanged(WId id)
// lok at transient windows first
while (transientId) {
if (updateMenuFromWindowIfHasMenu(transientId)) {
transientId = KWindowInfo(transientId, nullptr, NET::WM2TransientFor).transientFor();
if (updateMenuFromWindowIfHasMenu(id)) {
......@@ -262,7 +262,7 @@ void AppMenuModel::onWindowChanged(WId id)
KWindowInfo info(id, NET::WMState | NET::WMGeometry);
const bool contained = m_screenGeometry.isNull() || m_screenGeometry.contains(info.geometry().center());
setMenuHidden(info.isMinimized() || !contained);
setVisible(contained && !info.isMinimized());
......@@ -40,7 +40,7 @@ class AppMenuModel : public QAbstractListModel, public QAbstractNativeEventFilte
Q_PROPERTY(bool menuAvailable READ menuAvailable WRITE setMenuAvailable NOTIFY menuAvailableChanged)
Q_PROPERTY(bool menuHidden READ menuHidden NOTIFY menuHiddenChanged)
Q_PROPERTY(bool visible READ visible NOTIFY visibleChanged)
Q_PROPERTY(QRect screenGeometry READ screenGeometry WRITE setScreenGeometry NOTIFY screenGeometryChanged)
......@@ -62,7 +62,7 @@ public:
bool menuAvailable() const;
void setMenuAvailable(bool set);
bool menuHidden() const;
bool visible() const;
QRect screenGeometry() const;
void setScreenGeometry(QRect geometry);
......@@ -76,19 +76,19 @@ protected:
private Q_SLOTS:
void onActiveWindowChanged(WId id);
void onWindowChanged(WId id);
void setMenuHidden(bool hide);
void setVisible(bool visible);
void update();
void menuAvailableChanged();
void menuHiddenChanged();
void modelNeedsUpdate();
void screenGeometryChanged();
void visibleChanged();
bool m_menuAvailable;
bool m_menuHidden = false;
bool m_updatePending = false;
bool m_visible = true;
QRect m_screenGeometry;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment