[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdebase/workspace/plasma/applets/tasks
From: Aaron J. Seigo <aseigo () kde ! org>
Date: 2009-04-27 2:01:37
Message-ID: 1240797697.480372.24334.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 959750 by aseigo:
make the popups at least as wide as the buttons
BUG:181031
M +1 -1 abstracttaskitem.cpp
M +19 -0 taskgroupitem.cpp
M +8 -9 taskgroupitem.h
M +5 -0 windowtaskitem.cpp
--- trunk/KDE/kdebase/workspace/plasma/applets/tasks/abstracttaskitem.cpp \
#959749:959750 @@ -291,7 +291,7 @@
void AbstractTaskItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
{
- if (event->button() == Qt::LeftButton/* || event->button() == Qt::MidButton*/) {
+ if (event->button() == Qt::LeftButton) {
activate();
}
}
--- trunk/KDE/kdebase/workspace/plasma/applets/tasks/taskgroupitem.cpp #959749:959750
@@ -371,6 +371,10 @@
TaskManager::BasicMenu menu(qobject_cast<QWidget*>(this), m_group, \
&m_applet->groupManager(), actionList); menu.adjustSize();
+ if (m_applet->formFactor() != Plasma::Vertical) {
+ menu.setMinimumWidth(size().width());
+ }
+
Q_ASSERT(m_applet->containment());
Q_ASSERT(m_applet->containment()->corona());
menu.exec(m_applet->containment()->corona()->popupPosition(this, menu.size()));
@@ -566,6 +570,10 @@
m_popupDialog->setWindowFlags(Qt::FramelessWindowHint | \
Qt::WindowStaysOnTopHint);
//TODO in the future it may be possible to use the Qt::Popup flag instead of \
the eventFilter, but for now the focus works better with the eventFilter \
m_popupDialog->installEventFilter(this); +
+ int left, top, right, bottom;
+ m_popupDialog->getContentsMargins(&left, &top, &right, &bottom);
+ m_offscreenWidget->setMinimumWidth(size().width() - left - right);
m_popupDialog->setGraphicsWidget(m_offscreenWidget);
}
@@ -639,6 +647,17 @@
AbstractTaskItem::mouseMoveEvent(event);
}
+void TaskGroupItem::resizeEvent(QGraphicsSceneResizeEvent *event)
+{
+ Q_UNUSED(event)
+
+ if (m_offscreenWidget && m_popupDialog) {
+ int left, top, right, bottom;
+ m_popupDialog->getContentsMargins(&left, &top, &right, &bottom);
+ m_offscreenWidget->setMinimumWidth(size().width() - left - right);
+ }
+}
+
void TaskGroupItem::expand()
{
if (!collapsed()) {
--- trunk/KDE/kdebase/workspace/plasma/applets/tasks/taskgroupitem.h #959749:959750
@@ -126,10 +126,8 @@
void collapse();
void updatePreferredSize();
-private Q_SLOTS:
- void constraintsChanged(Plasma::Constraints);
- void clearPopupLostFocus();
- void reloadTheme();
+public slots:
+ void updateActive(AbstractTaskItem *);
protected:
AbstractTaskItem *taskItemForWId(WId id);
@@ -145,17 +143,18 @@
void mousePressEvent(QGraphicsSceneMouseEvent *event);
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
+ void resizeEvent(QGraphicsSceneResizeEvent *event);
-public slots:
- void updateActive(AbstractTaskItem *);
-
-protected:
void updateToolTip();
protected slots:
virtual void wheelEvent(QGraphicsSceneWheelEvent *event);
-private slots:
+private Q_SLOTS:
+ void constraintsChanged(Plasma::Constraints);
+ void clearPopupLostFocus();
+ void reloadTheme();
+
void updateTask(::TaskManager::TaskChanges changes);
/** Stay informed about changes in group */
--- trunk/KDE/kdebase/workspace/plasma/applets/tasks/windowtaskitem.cpp \
#959749:959750 @@ -276,6 +276,11 @@
TaskManager::BasicMenu menu(0, m_task, &m_applet->groupManager(), actionList);
menu.adjustSize();
+
+ if (m_applet->formFactor() != Plasma::Vertical) {
+ menu.setMinimumWidth(size().width());
+ }
+
Q_ASSERT(m_applet->containment());
Q_ASSERT(m_applet->containment()->corona());
menu.exec(m_applet->containment()->corona()->popupPosition(this, menu.size()));
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic