#include <KProtocolInfo>
#include <KProtocolManager>
#include <KRecentFilesAction>
+#include <KRuntimePlatform>
#include <KShell>
#include <KShortcutsDialog>
#include <KStandardAction>
setupDockWidgets();
- setupGUI(Save | Create | ToolBar);
+ const bool usePhoneUi{KRuntimePlatform::runtimePlatform().contains(QLatin1String("phone"))};
+ setupGUI(Save | Create | ToolBar, usePhoneUi ? QStringLiteral("dolphinuiforphones.rc") : QString() /* load the default dolphinui.rc file */);
stateChanged(QStringLiteral("new_file"));
QClipboard *clipboard = QApplication::clipboard();
if (firstRun) {
menuBar()->setVisible(false);
+
+ if (usePhoneUi) {
+ Q_ASSERT(qobject_cast<QDockWidget *>(m_placesPanel->parent()));
+ m_placesPanel->parentWidget()->hide();
+ GeneralSettings::setShowZoomSlider(false);
+ }
}
const bool showMenu = !menuBar()->isHidden();
{
KXmlGuiWindow::showEvent(event);
- if (!event->spontaneous()) {
+ if (!event->spontaneous() && m_activeViewContainer) {
m_activeViewContainer->view()->setFocus();
}
}
void DolphinMainWindow::slotDoubleClickViewBackground(Qt::MouseButton button)
{
- if (button == Qt::MouseButton::LeftButton) {
+ if (button != Qt::MouseButton::LeftButton) {
// only handle left mouse button for now
return;
}