Changeset View
Changeset View
Standalone View
Standalone View
app/mainwindow.cpp
Show First 20 Lines • Show All 78 Lines • ▼ Show 20 Line(s) | 76 | { | |||
---|---|---|---|---|---|
79 | setAttribute(Qt::WA_TranslucentBackground, true); | 79 | setAttribute(Qt::WA_TranslucentBackground, true); | ||
80 | setAttribute(Qt::WA_DeleteOnClose, false); | 80 | setAttribute(Qt::WA_DeleteOnClose, false); | ||
81 | setAttribute(Qt::WA_QuitOnClose, true); | 81 | setAttribute(Qt::WA_QuitOnClose, true); | ||
82 | 82 | | |||
83 | m_skin = new Skin(); | 83 | m_skin = new Skin(); | ||
84 | m_menu = new QMenu(this); | 84 | m_menu = new QMenu(this); | ||
85 | m_helpMenu = new KHelpMenu(this, KAboutData::applicationData()); | 85 | m_helpMenu = new KHelpMenu(this, KAboutData::applicationData()); | ||
86 | m_sessionStack = new SessionStack(this); | 86 | m_sessionStack = new SessionStack(this); | ||
87 | m_tabBar = new TabBar(this); | | |||
88 | m_titleBar = new TitleBar(this); | 87 | m_titleBar = new TitleBar(this); | ||
88 | m_tabBar = new TabBar(this); | ||||
89 | | ||||
89 | m_firstRunDialog = NULL; | 90 | m_firstRunDialog = NULL; | ||
90 | m_isFullscreen = false; | 91 | m_isFullscreen = false; | ||
91 | 92 | | |||
92 | #if HAVE_X11 | 93 | #if HAVE_X11 | ||
93 | m_kwinAssistPropSet = false; | 94 | m_kwinAssistPropSet = false; | ||
94 | m_isX11 = KWindowSystem::isPlatformX11(); | 95 | m_isX11 = KWindowSystem::isPlatformX11(); | ||
95 | #else | 96 | #else | ||
96 | m_isX11 = false; | 97 | m_isX11 = false; | ||
▲ Show 20 Lines • Show All 547 Lines • ▼ Show 20 Line(s) | 622 | { | |||
644 | m_windowHeightMenu->setTitle(xi18nc("@title:menu", "Height")); | 645 | m_windowHeightMenu->setTitle(xi18nc("@title:menu", "Height")); | ||
645 | m_menu->addMenu(m_windowHeightMenu); | 646 | m_menu->addMenu(m_windowHeightMenu); | ||
646 | 647 | | |||
647 | m_menu->insertSection(0, xi18nc("@title:menu", "Settings")); | 648 | m_menu->insertSection(0, xi18nc("@title:menu", "Settings")); | ||
648 | m_menu->addAction(actionCollection()->action(QStringLiteral("manage-profiles"))); | 649 | m_menu->addAction(actionCollection()->action(QStringLiteral("manage-profiles"))); | ||
649 | m_menu->addAction(actionCollection()->action(QLatin1String(KStandardAction::name(KStandardAction::KeyBindings)))); | 650 | m_menu->addAction(actionCollection()->action(QLatin1String(KStandardAction::name(KStandardAction::KeyBindings)))); | ||
650 | m_menu->addAction(actionCollection()->action(QLatin1String(KStandardAction::name(KStandardAction::ConfigureNotifications)))); | 651 | m_menu->addAction(actionCollection()->action(QLatin1String(KStandardAction::name(KStandardAction::ConfigureNotifications)))); | ||
651 | m_menu->addAction(actionCollection()->action(QLatin1String(KStandardAction::name(KStandardAction::Preferences)))); | 652 | m_menu->addAction(actionCollection()->action(QLatin1String(KStandardAction::name(KStandardAction::Preferences)))); | ||
653 | | ||||
654 | m_menu->addSeparator(); | ||||
655 | m_menu->addAction(actionCollection()->action(QLatin1String(KStandardAction::name(KStandardAction::Quit)))); | ||||
652 | } | 656 | } | ||
653 | 657 | | |||
654 | void MainWindow::updateScreenMenu() | 658 | void MainWindow::updateScreenMenu() | ||
655 | { | 659 | { | ||
656 | QAction* action; | 660 | QAction* action; | ||
657 | 661 | | |||
658 | m_screenMenu->clear(); | 662 | m_screenMenu->clear(); | ||
659 | 663 | | |||
▲ Show 20 Lines • Show All 229 Lines • ▼ Show 20 Line(s) | 888 | #endif | |||
889 | 893 | | |||
890 | if (Settings::frames() > 0) | 894 | if (Settings::frames() > 0) | ||
891 | m_animationStepSize = maxHeight / Settings::frames(); | 895 | m_animationStepSize = maxHeight / Settings::frames(); | ||
892 | else | 896 | else | ||
893 | m_animationStepSize = maxHeight; | 897 | m_animationStepSize = maxHeight; | ||
894 | 898 | | |||
895 | if (Settings::showTabBar()) | 899 | if (Settings::showTabBar()) | ||
896 | { | 900 | { | ||
901 | if (m_skin->tabBarCompact()) | ||||
902 | { | ||||
903 | m_tabBar->setGeometry(m_skin->tabBarLeft(), maxHeight, | ||||
904 | width() - m_skin->tabBarLeft() - m_skin->tabBarRight(), m_tabBar->height()); | ||||
905 | } | ||||
906 | else | ||||
907 | { | ||||
897 | maxHeight -= m_tabBar->height(); | 908 | maxHeight -= m_tabBar->height(); | ||
898 | m_tabBar->setGeometry(m_skin->borderWidth(), maxHeight, | 909 | m_tabBar->setGeometry(m_skin->borderWidth(), maxHeight, | ||
899 | width() - 2 * m_skin->borderWidth(), m_tabBar->height()); | 910 | width() - 2 * m_skin->borderWidth(), m_tabBar->height()); | ||
900 | } | 911 | } | ||
912 | } | ||||
901 | 913 | | |||
902 | m_sessionStack->setGeometry(m_skin->borderWidth(), 0, | 914 | m_sessionStack->setGeometry(m_skin->borderWidth(), 0, | ||
903 | width() - 2 * m_skin->borderWidth(), maxHeight); | 915 | width() - 2 * m_skin->borderWidth(), maxHeight); | ||
904 | 916 | | |||
905 | updateMask(); | 917 | updateMask(); | ||
906 | } | 918 | } | ||
907 | 919 | | |||
908 | void MainWindow::setScreen(QAction* action) | 920 | void MainWindow::setScreen(QAction* action) | ||
▲ Show 20 Lines • Show All 637 Lines • Show Last 20 Lines |