on xenial help sign in
Remove HUD from the bottom edge.
commit9606c9b8042dc4bbeedadf58317314e8aedf5068 authorMichael Zanetti <michael.zanetti@canonical.com> dateWed 7 May 2014, 10:27 (12 years ago) parent8d8db7d
5 files changed+3−167
plugins/Utils/CMakeLists.txt−1 plugins/Utils/bottombarvisibilitycommunicatorshell.cpp−49 plugins/Utils/bottombarvisibilitycommunicatorshell.h−59 plugins/Utils/plugin.cpp−10 qml/Shell.qml+3−48
plugins/Utils/CMakeLists.txt−1
@@ -11,7 +11,6 @@ include_directories(
1111)
1212
1313set(QMLPLUGIN_SRC
14− bottombarvisibilitycommunicatorshell.cpp
1514 qlimitproxymodelqml.cpp
1615 qsortfilterproxymodelqml.cpp
1716 timeformatter.cpp
plugins/Utils/bottombarvisibilitycommunicatorshell.cppdeleted−49
@@ -1,49 +0,0 @@
1−/*
2− * Copyright (C) 2012 Canonical, Ltd.
3− *
4− * This program is free software; you can redistribute it and/or modify
5− * it under the terms of the GNU General Public License as published by
6− * the Free Software Foundation; version 3.
7− *
8− * This program is distributed in the hope that it will be useful,
9− * but WITHOUT ANY WARRANTY; without even the implied warranty of
10− * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11− * GNU General Public License for more details.
12− *
13− * You should have received a copy of the GNU General Public License
14− * along with this program. If not, see <http://www.gnu.org/licenses/>.
15− */
16−
17−#include "bottombarvisibilitycommunicatorshell.h"
18−
19−BottomBarVisibilityCommunicatorShell::BottomBarVisibilityCommunicatorShell()
20− : m_forceHidden(false),
21− m_position(0)
22−{
23−}
24−
25−bool BottomBarVisibilityCommunicatorShell::forceHidden() const
26−{
27− return m_forceHidden;
28−}
29−
30−double BottomBarVisibilityCommunicatorShell::position() const
31−{
32− return m_position;
33−}
34−
35−void BottomBarVisibilityCommunicatorShell::setForceHidden(bool forceHidden)
36−{
37− if (forceHidden != m_forceHidden) {
38− m_forceHidden = forceHidden;
39− Q_EMIT forceHiddenChanged(forceHidden);
40− }
41−}
42−
43−void BottomBarVisibilityCommunicatorShell::setPosition(double position)
44−{
45− if (position != m_position) {
46− m_position = position;
47− Q_EMIT positionChanged(position);
48− }
49−}
plugins/Utils/bottombarvisibilitycommunicatorshell.hdeleted−59
@@ -1,59 +0,0 @@
1−/*
2− * Copyright (C) 2012 Canonical, Ltd.
3− *
4− * This program is free software; you can redistribute it and/or modify
5− * it under the terms of the GNU General Public License as published by
6− * the Free Software Foundation; version 3.
7− *
8− * This program is distributed in the hope that it will be useful,
9− * but WITHOUT ANY WARRANTY; without even the implied warranty of
10− * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11− * GNU General Public License for more details.
12− *
13− * You should have received a copy of the GNU General Public License
14− * along with this program. If not, see <http://www.gnu.org/licenses/>.
15− */
16−
17−#ifndef BOTTOMBARVISIBILITYCOMMUNICATORSHELL_H
18−#define BOTTOMBARVISIBILITYCOMMUNICATORSHELL_H
19−
20−#include <QObject>
21−
22−class QDBusInterface;
23−
24−/** This is an internal class used to talk with the bottom bar used by either
25− * applications or the SDK.
26− * There is a method to force the bottom bar to be hidden or otherwise behave as usual
27− */
28−
29−class BottomBarVisibilityCommunicatorShell : public QObject
30−{
31− Q_OBJECT
32− Q_PROPERTY(bool forceHidden READ forceHidden WRITE setForceHidden NOTIFY forceHiddenChanged)
33− Q_PROPERTY(double position READ position WRITE setPosition NOTIFY positionChanged)
34−
35− Q_CLASSINFO("D-Bus Interface", "com.canonical.Shell.BottomBarVisibilityCommunicator")
36−public:
37− static BottomBarVisibilityCommunicatorShell& instance() {
38− static BottomBarVisibilityCommunicatorShell instance;
39− return instance;
40− }
41−
42− bool forceHidden() const;
43− void setForceHidden(bool forceHidden);
44−
45− double position() const;
46− void setPosition(double position);
47−
48−Q_SIGNALS:
49− void forceHiddenChanged(bool forceHidden);
50− void positionChanged(double position);
51−
52−private:
53− BottomBarVisibilityCommunicatorShell();
54−
55− bool m_forceHidden;
56− double m_position;
57−};
58−
59−#endif
plugins/Utils/plugin.cpp−10
@@ -26,16 +26,12 @@
2626#include "plugin.h"
2727
2828// local
29−#include "bottombarvisibilitycommunicatorshell.h"
3029#include "qlimitproxymodelqml.h"
3130#include "qsortfilterproxymodelqml.h"
3231#include "timeformatter.h"
3332#include "unitymenumodelpaths.h"
3433#include "easingcurve.h"
3534
36−static const char* BOTTOM_BAR_VISIBILITY_COMMUNICATOR_DBUS_PATH = "/BottomBarVisibilityCommunicator";
37−static const char* DBUS_SERVICE = "com.canonical.Shell.BottomBarVisibilityCommunicator";
38−
3935void UtilsPlugin::registerTypes(const char *uri)
4036{
4137 Q_ASSERT(uri == QLatin1String("Utils"));
@@ -45,16 +41,10 @@ void UtilsPlugin::registerTypes(const char *uri)
4541 qmlRegisterType<UnityMenuModelPaths>(uri, 0, 1, "UnityMenuModelPaths");
4642 qmlRegisterType<TimeFormatter>(uri, 0, 1, "TimeFormatter");
4743 qmlRegisterType<GDateTimeFormatter>(uri, 0, 1, "GDateTimeFormatter");
48− qmlRegisterUncreatableType<BottomBarVisibilityCommunicatorShell>(uri, 0, 1, "BottomBarVisibilityCommunicatorShell", "Can't create BottomBarVisibilityCommunicatorShell");
4944 qmlRegisterType<EasingCurve>(uri, 0, 1, "EasingCurve");
5045}
5146
5247void UtilsPlugin::initializeEngine(QQmlEngine *engine, const char *uri)
5348{
5449 QQmlExtensionPlugin::initializeEngine(engine, uri);
55−
56− QDBusConnection::sessionBus().registerService(DBUS_SERVICE);
57− BottomBarVisibilityCommunicatorShell *bottomBarVisibilityCommunicator = &BottomBarVisibilityCommunicatorShell::instance();
58− QDBusConnection::sessionBus().registerObject(BOTTOM_BAR_VISIBILITY_COMMUNICATOR_DBUS_PATH, bottomBarVisibilityCommunicator, QDBusConnection::ExportAllContents);
59− engine->rootContext()->setContextProperty("bottomBarVisibilityCommunicatorShell", bottomBarVisibilityCommunicator);
6050}
qml/Shell.qml+3−48
@@ -28,9 +28,7 @@ import "Dash"
2828import "Greeter"
2929import "Launcher"
3030import "Panel"
31−import "Hud"
3231import "Components"
33−import "Bottombar"
3432import "Notifications"
3533import Unity.Notifications 1.0 as NotificationBackend
3634
@@ -308,7 +306,7 @@ FocusScope {
308306
309307 readonly property int backgroundTopMargin: -panel.panelHeight
310308
311− hides: [launcher, panel.indicators, hud]
309+ hides: [launcher, panel.indicators]
312310 shown: false
313311 enabled: true
314312 showAnimation: StandardAnimation { property: "opacity"; to: 1 }
@@ -381,7 +379,7 @@ FocusScope {
381379 objectName: "greeter"
382380
383381 available: true
384− hides: [launcher, panel.indicators, hud]
382+ hides: [launcher, panel.indicators]
385383 shown: true
386384
387385 defaultBackground: shell.background
@@ -424,7 +422,7 @@ FocusScope {
424422 InputFilterArea {
425423 anchors.fill: parent
426424 blockInput: ApplicationManager.focusedApplicationId.length === 0 || greeter.shown || lockscreen.shown || launcher.shown
427− || panel.indicators.shown || hud.shown
425+ || panel.indicators.shown
428426 }
429427
430428 Connections {
@@ -488,47 +486,6 @@ FocusScope {
488486 }
489487 }
490488
491− Hud {
492− id: hud
493−
494− width: parent.width > units.gu(60) ? units.gu(40) : parent.width
495− height: parent.height
496−
497− available: !greeter.shown && !panel.indicators.shown && !lockscreen.shown && edgeDemo.dashEnabled
498− shown: false
499− showAnimation: StandardAnimation { property: "y"; duration: hud.showableAnimationDuration; to: 0; easing.type: Easing.Linear }
500− hideAnimation: StandardAnimation { property: "y"; duration: hud.showableAnimationDuration; to: hudRevealer.closedValue; easing.type: Easing.Linear }
501−
502− Connections {
503− target: ApplicationManager
504− onFocusedApplicationIdChanged: hud.hide()
505− }
506− }
507−
508− Revealer {
509− id: hudRevealer
510−
511− enabled: hud.shown
512− width: hud.width
513− anchors.left: hud.left
514− height: parent.height
515− target: hud.revealerTarget
516− closedValue: height
517− openedValue: 0
518− direction: Qt.RightToLeft
519− orientation: Qt.Vertical
520− handleSize: hud.handleHeight
521− onCloseClicked: target.hide()
522− }
523−
524− Bottombar {
525− id: bottombar
526− theHud: hud
527− anchors.fill: parent
528− enabled: hud.available
529− applicationIsOnForeground: ApplicationManager.focusedApplicationId
530− }
531−
532489 InputFilterArea {
533490 blockInput: launcher.shown
534491 anchors {
@@ -576,8 +533,6 @@ FocusScope {
576533 onShownChanged: {
577534 if (shown) {
578535 panel.indicators.hide()
579− hud.hide()
580− bottombar.hide()
581536 }
582537 }
583538 }