Changeset View
Changeset View
Standalone View
Standalone View
src/ViewContainer.cpp
Show First 20 Lines • Show All 211 Lines • ▼ Show 20 Line(s) | 211 | if (!url.isLocalFile()) { | |||
---|---|---|---|---|---|
212 | setStyleSheet(KonsoleSettings::tabBarStyleSheet()); | 212 | setStyleSheet(KonsoleSettings::tabBarStyleSheet()); | ||
213 | } | 213 | } | ||
214 | 214 | | |||
215 | QFile file(url.toLocalFile()); | 215 | QFile file(url.toLocalFile()); | ||
216 | if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) { | 216 | if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) { | ||
217 | setStyleSheet(KonsoleSettings::tabBarStyleSheet()); | 217 | setStyleSheet(KonsoleSettings::tabBarStyleSheet()); | ||
218 | } | 218 | } | ||
219 | 219 | | |||
220 | QString styleSheetText; | | |||
221 | QTextStream in(&file); | 220 | QTextStream in(&file); | ||
222 | while (!in.atEnd()) { | 221 | setStyleSheet(in.readAll()); | ||
223 | styleSheetText.append(in.readLine()); | | |||
224 | } | | |||
225 | setStyleSheet(styleSheetText); | | |||
226 | } | 222 | } | ||
227 | 223 | | |||
228 | void TabbedViewContainer::moveActiveView(MoveDirection direction) | 224 | void TabbedViewContainer::moveActiveView(MoveDirection direction) | ||
229 | { | 225 | { | ||
230 | const int currentIndex = indexOf(currentWidget()); | 226 | const int currentIndex = indexOf(currentWidget()); | ||
231 | int newIndex = direction == MoveViewLeft ? qMax(currentIndex - 1, 0) : qMin(currentIndex + 1, count() - 1); | 227 | int newIndex = direction == MoveViewLeft ? qMax(currentIndex - 1, 0) : qMin(currentIndex + 1, count() - 1); | ||
232 | 228 | | |||
233 | auto swappedWidget = widget(newIndex); | 229 | auto swappedWidget = widget(newIndex); | ||
▲ Show 20 Lines • Show All 308 Lines • Show Last 20 Lines |