Compare commits

...

4 Commits

Author SHA1 Message Date
Jacopo De Simoi 01dd0843be [notifications] HACK fix width 7 years ago
Jacopo De Simoi a527b56f25 [Krunner] HACK: hardcode the right width! 7 years ago
Jacopo De Simoi 1da0a69cc5 [Krunner] Leaner look 7 years ago
Jacopo De Simoi 8db0413671 Add shortcut to hide panel 7 years ago
  1. 2
      applets/notifications/package/contents/ui/global/Globals.qml
  2. 9
      lookandfeel/contents/runcommand/RunCommand.qml
  3. 4
      shell/panelview.cpp
  4. 2
      shell/panelview.h
  5. 28
      shell/shellcorona.cpp
  6. 5
      shell/shellcorona.h

@ -127,7 +127,7 @@ QtObject {
}
// The raw width of the popup's content item, the Dialog itself adds some margins
property int popupWidth: units.gridUnit * 18
property int popupWidth: 818
property int popupEdgeDistance: units.largeSpacing
property int popupSpacing: units.largeSpacing

@ -54,13 +54,13 @@ ColumnLayout {
Layout.alignment: Qt.AlignTop
PlasmaComponents.ToolButton {
iconSource: "configure"
visible: false
onClicked: {
runnerWindow.visible = false
runnerWindow.displayConfiguration()
}
Accessible.name: i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Configure")
Accessible.description: i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Configure Search Plugins")
visible: runnerWindow.canConfigure
tooltip: i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Configure...")
}
PlasmaComponents.TextField {
@ -68,7 +68,7 @@ ColumnLayout {
property bool allowCompletion: false
clearButtonShown: true
Layout.minimumWidth: units.gridUnit * 25
Layout.minimumWidth: 818
activeFocusOnPress: true
placeholderText: results.runnerName ? i18ndc("plasma_lookandfeel_org.kde.lookandfeel",
@ -169,6 +169,7 @@ ColumnLayout {
}
PlasmaComponents.ToolButton {
iconSource: "window-close"
visible: false
onClicked: runnerWindow.visible = false
Accessible.name: i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Close")
Accessible.description: i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Close Search")
@ -246,7 +247,7 @@ ColumnLayout {
}
Keys.onReturnPressed: runCurrentIndex()
Keys.onEnterPressed: runCurrentIndex()
Keys.onTabPressed: {
if (currentIndex == listView.count-1) {
listView.nextItemInFocusChain(true).forceActiveFocus();
@ -272,7 +273,7 @@ ColumnLayout {
queryField.focus = true;
}
}
Keys.onUpPressed: decrementCurrentIndex()
Keys.onDownPressed: incrementCurrentIndex()

@ -307,9 +307,9 @@ void PanelView::setBackgroundHints(Plasma::Types::BackgroundHints hint)
if (m_backgroundHints == hint) {
return;
}
m_backgroundHints = hint;
emit backgroundHintsChanged();
}

@ -81,7 +81,7 @@ class PanelView : public PlasmaQuick::ContainmentView
* support NoBackground in order to disable blur/contrast effects and remove
* the panel shadows
* @since 5.9
*/
*/
Q_PROPERTY(Plasma::Types::BackgroundHints backgroundHints WRITE setBackgroundHints READ backgroundHints NOTIFY backgroundHintsChanged)
/**

@ -162,6 +162,8 @@ ShellCorona::ShellCorona(QObject *parent)
connect(this, &ShellCorona::containmentAdded,
this, &ShellCorona::handleContainmentAdded);
QAction *dashboardAction = actions()->addAction(QStringLiteral("show dashboard"));
QObject::connect(dashboardAction, &QAction::triggered,
this, &ShellCorona::setDashboardShown);
@ -177,6 +179,21 @@ ShellCorona::ShellCorona(QObject *parent)
dashboardAction->setData(Plasma::Types::ControlAction);
KGlobalAccel::self()->setGlobalShortcut(dashboardAction, Qt::CTRL + Qt::Key_F12);
QAction *panelAction = actions()->addAction(QStringLiteral("show panel"));
QObject::connect(panelAction, &QAction::triggered,
this, &ShellCorona::togglePanelVisibility);
panelAction->setText(i18n("Toggle Panel"));
// connect(KWindowSystem::self(), &KWindowSystem::showingDesktopChanged, [panelAction](bool showing) {
// panelAction->setText(showing ? i18n("Hide Desktop") : i18n("Show Desktop"));
// panelAction->setChecked(showing);
// });
// panelAction->setAutoRepeat(true);
// panelAction->setCheckable(true);
// panelAction->setIcon(QIcon::fromTheme(QStringLiteral("panel-show")));
// panelAction->setData(Plasma::Types::ControlAction);
KGlobalAccel::self()->setGlobalShortcut(panelAction, Qt::CTRL + Qt::Key_F11);
checkAddPanelAction();
connect(KSycoca::self(), SIGNAL(databaseChanged(QStringList)), this, SLOT(checkAddPanelAction(QStringList)));
@ -1102,6 +1119,16 @@ QList<PanelView *> ShellCorona::panelsForScreen(QScreen *screen) const
return ret;
}
void ShellCorona::togglePanelVisibility()
{
for (auto it = m_panelViews.constBegin(), end = m_panelViews.constEnd(); it != end; ++it) {
if (it.value()->screen() != qGuiApp->primaryScreen()) {
continue;
}
it.value()->setVisible(!it.value()->isVisible());
}
}
DesktopView* ShellCorona::desktopForScreen(QScreen* screen) const
{
return m_desktopViewforId.value(m_screenPool->id(screen->name()));
@ -2119,4 +2146,3 @@ void ShellCorona::activateTaskManagerEntry(int index)
#include "moc_shellcorona.cpp"

@ -142,7 +142,7 @@ public Q_SLOTS:
void showInteractiveKWinConsole();
void loadKWinScriptInInteractiveConsole(const QString &script);
void toggleActivityManager();
void toggleWidgetExplorer();
void toggleWidgetExplorer();
void evaluateScript(const QString &string);
void activateLauncherMenu();
@ -187,6 +187,7 @@ protected Q_SLOTS:
void showAlternativesForApplet(Plasma::Applet *applet);
void togglePanelVisibility();
private Q_SLOTS:
void createWaitingPanels();
void handleContainmentAdded(Plasma::Containment *c);
@ -253,5 +254,3 @@ private:
};
#endif // SHELLCORONA_H

Loading…
Cancel
Save