diff options
Diffstat (limited to 'src/views')
| -rw-r--r-- | src/views/dolphinview.cpp | 13 | ||||
| -rw-r--r-- | src/views/dolphinview.h | 5 | ||||
| -rw-r--r-- | src/views/tooltips/filemetadatatooltip.cpp | 4 |
3 files changed, 15 insertions, 7 deletions
diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp index 5466fd38e..4105628ee 100644 --- a/src/views/dolphinview.cpp +++ b/src/views/dolphinview.cpp @@ -75,10 +75,6 @@ #endif #include <KFormat> -namespace { - const int MaxModeEnum = DolphinView::CompactView; -} - DolphinView::DolphinView(const QUrl& url, QWidget* parent) : QWidget(parent), m_active(true), @@ -728,6 +724,15 @@ void DolphinView::stopLoading() bool DolphinView::eventFilter(QObject* watched, QEvent* event) { switch (event->type()) { + case QEvent::KeyPress: + if (GeneralSettings::useTabForSwitchingSplitView()) { + QKeyEvent* keyEvent = static_cast<QKeyEvent*>(event); + if (keyEvent->key() == Qt::Key_Tab && keyEvent->modifiers() == Qt::NoModifier) { + toggleActiveViewRequested(); + return true; + } + } + break; case QEvent::FocusIn: if (watched == m_container) { setActive(true); diff --git a/src/views/dolphinview.h b/src/views/dolphinview.h index d1a5d5005..0b0d8196d 100644 --- a/src/views/dolphinview.h +++ b/src/views/dolphinview.h @@ -546,6 +546,11 @@ signals: */ void goForwardRequested(); + /** + * Is emitted when the user wants to move the focus to another view. + */ + void toggleActiveViewRequested(); + protected: /** Changes the zoom level if Control is pressed during a wheel event. */ virtual void wheelEvent(QWheelEvent* event) Q_DECL_OVERRIDE; diff --git a/src/views/tooltips/filemetadatatooltip.cpp b/src/views/tooltips/filemetadatatooltip.cpp index 8fbca290d..0d58717d4 100644 --- a/src/views/tooltips/filemetadatatooltip.cpp +++ b/src/views/tooltips/filemetadatatooltip.cpp @@ -48,7 +48,7 @@ FileMetaDataToolTip::FileMetaDataToolTip(QWidget* parent) : m_fileMetaDataWidget(0) { setAttribute(Qt::WA_TranslucentBackground); - setWindowFlags(Qt::ToolTip | Qt::FramelessWindowHint); + setWindowFlags(Qt::ToolTip | Qt::FramelessWindowHint | Qt::NoDropShadowWindowHint); // Create widget for file preview m_preview = new QLabel(this); @@ -174,8 +174,6 @@ void FileMetaDataToolTip::paintEvent(QPaintEvent* event) void FileMetaDataToolTip::showEvent(QShowEvent *) { -#pragma message("TODO: port Plasma::WindowEffects::overrideShadow") - //Plasma::WindowEffects::overrideShadow(winId(), true); KWindowEffects::enableBlurBehind(winId(), true, mask()); } |
