Changeset View
Changeset View
Standalone View
Standalone View
kded/config.cpp
Show First 20 Lines • Show All 77 Lines • ▼ Show 20 Line(s) | |||||
78 | } | 78 | } | ||
79 | 79 | | |||
80 | void Config::setDeviceOrientation(Globals::DeviceOrientation orientation) | 80 | void Config::setDeviceOrientation(Globals::DeviceOrientation orientation) | ||
81 | { | 81 | { | ||
82 | for (KScreen::OutputPtr &output : m_data->outputs()) { | 82 | for (KScreen::OutputPtr &output : m_data->outputs()) { | ||
83 | if (!m_control->getAutoRotate(output)) { | 83 | if (!m_control->getAutoRotate(output)) { | ||
84 | continue; | 84 | continue; | ||
85 | } | 85 | } | ||
86 | if (Output::updateOrientation(output, orientation)) { | 86 | auto finalOrientation = orientation; | ||
87 | if (m_control->getAutoRotateOnlyInTabletMode(output) && !m_data->tabletModeEngaged()) { | ||||
88 | finalOrientation = Globals::DeviceOrientation::TopUp; | ||||
89 | } | ||||
90 | if (Output::updateOrientation(output, finalOrientation)) { | ||||
87 | // TODO: call Layouter to find fitting positions for other outputs again | 91 | // TODO: call Layouter to find fitting positions for other outputs again | ||
88 | return; | 92 | return; | ||
89 | } | 93 | } | ||
90 | } | 94 | } | ||
91 | } | 95 | } | ||
92 | 96 | | |||
93 | bool Config::fileExists() const | 97 | bool Config::fileExists() const | ||
94 | { | 98 | { | ||
▲ Show 20 Lines • Show All 178 Lines • Show Last 20 Lines |