Changeset View
Changeset View
Standalone View
Standalone View
src/ViewManager.cpp
Show First 20 Lines • Show All 598 Lines • ▼ Show 20 Line(s) | 591 | { | |||
---|---|---|---|---|---|
599 | TerminalDisplay *display = createTerminalDisplay(session); | 599 | TerminalDisplay *display = createTerminalDisplay(session); | ||
600 | const Profile::Ptr profile = SessionManager::instance()->sessionProfile(session); | 600 | const Profile::Ptr profile = SessionManager::instance()->sessionProfile(session); | ||
601 | applyProfileToView(display, profile); | 601 | applyProfileToView(display, profile); | ||
602 | 602 | | |||
603 | // set initial size | 603 | // set initial size | ||
604 | const QSize &preferredSize = session->preferredSize(); | 604 | const QSize &preferredSize = session->preferredSize(); | ||
605 | 605 | | |||
606 | display->setSize(preferredSize.width(), preferredSize.height()); | 606 | display->setSize(preferredSize.width(), preferredSize.height()); | ||
607 | ViewProperties *properties = createController(session, display); | 607 | createController(session, display); | ||
608 | 608 | | |||
609 | _sessionMap[display] = session; | 609 | _sessionMap[display] = session; | ||
610 | container->addView(display, properties, index); | 610 | container->addView(display, index); | ||
611 | session->addView(display); | 611 | session->addView(display); | ||
612 | 612 | | |||
613 | // tell the session whether it has a light or dark background | 613 | // tell the session whether it has a light or dark background | ||
614 | session->setDarkBackground(colorSchemeForProfile(profile)->hasDarkBackground()); | 614 | session->setDarkBackground(colorSchemeForProfile(profile)->hasDarkBackground()); | ||
615 | container->setCurrentWidget(display); | 615 | container->setCurrentWidget(display); | ||
616 | display->setFocus(Qt::OtherFocusReason); | 616 | display->setFocus(Qt::OtherFocusReason); | ||
617 | 617 | | |||
618 | updateDetachViewState(); | 618 | updateDetachViewState(); | ||
▲ Show 20 Lines • Show All 513 Lines • Show Last 20 Lines |