Changeset View
Changeset View
Standalone View
Standalone View
shell/panelview.cpp
Show First 20 Lines • Show All 57 Lines • ▼ Show 20 Line(s) | 55 | : PlasmaQuick::ContainmentView(corona, parent), | |||
---|---|---|---|---|---|
58 | m_minLength(0), | 58 | m_minLength(0), | ||
59 | m_contentLength(0), | 59 | m_contentLength(0), | ||
60 | m_distance(0), | 60 | m_distance(0), | ||
61 | m_thickness(30), | 61 | m_thickness(30), | ||
62 | m_initCompleted(false), | 62 | m_initCompleted(false), | ||
63 | m_alignment(Qt::AlignLeft), | 63 | m_alignment(Qt::AlignLeft), | ||
64 | m_corona(corona), | 64 | m_corona(corona), | ||
65 | m_visibilityMode(NormalPanel), | 65 | m_visibilityMode(NormalPanel), | ||
66 | m_background(nullptr), | | |||
67 | m_backgroundHints(Plasma::Types::StandardBackground), | 66 | m_backgroundHints(Plasma::Types::StandardBackground), | ||
68 | m_shellSurface(nullptr) | 67 | m_shellSurface(nullptr) | ||
69 | { | 68 | { | ||
70 | if (targetScreen) { | 69 | if (targetScreen) { | ||
71 | setPosition(targetScreen->geometry().center()); | 70 | setPosition(targetScreen->geometry().center()); | ||
72 | setScreenToFollow(targetScreen); | 71 | setScreenToFollow(targetScreen); | ||
73 | setScreen(targetScreen); | 72 | setScreen(targetScreen); | ||
74 | } | 73 | } | ||
▲ Show 20 Lines • Show All 882 Lines • ▼ Show 20 Line(s) | 953 | { | |||
957 | QQuickItem *rootObject = this->rootObject(); | 956 | QQuickItem *rootObject = this->rootObject(); | ||
958 | if (rootObject) { | 957 | if (rootObject) { | ||
959 | const QVariant maskProperty = rootObject->property("panelMask"); | 958 | const QVariant maskProperty = rootObject->property("panelMask"); | ||
960 | if (static_cast<QMetaType::Type>(maskProperty.type()) == QMetaType::QRegion) { | 959 | if (static_cast<QMetaType::Type>(maskProperty.type()) == QMetaType::QRegion) { | ||
961 | mask = maskProperty.value<QRegion>(); | 960 | mask = maskProperty.value<QRegion>(); | ||
962 | } | 961 | } | ||
963 | } | 962 | } | ||
964 | 963 | | |||
965 | // old hack for non-compositing: | | |||
966 | // assuming the desktoptheme uses "widgets/panel-background" for the panel | | |||
967 | // before "panelMask" was added to expected property set of panel objects | | |||
968 | // TODO: understand if still needed | | |||
969 | if (mask.isEmpty() && !KWindowSystem::compositingActive()) { | | |||
970 | if (!m_background) { | | |||
971 | m_background = new Plasma::FrameSvg(this); | | |||
972 | m_background->setImagePath(QStringLiteral("widgets/panel-background")); | | |||
973 | } | | |||
974 | | ||||
975 | m_background->setEnabledBorders(enabledBorders()); | | |||
976 | | ||||
977 | m_background->resizeFrame(size()); | | |||
978 | mask = m_background->mask(); | | |||
979 | } | | |||
980 | | ||||
981 | setMask(mask); | 964 | setMask(mask); | ||
982 | } | 965 | } | ||
983 | 966 | | |||
984 | bool PanelView::canSetStrut() const | 967 | bool PanelView::canSetStrut() const | ||
985 | { | 968 | { | ||
986 | #if HAVE_X11 | 969 | #if HAVE_X11 | ||
987 | if (!KWindowSystem::isPlatformX11()) { | 970 | if (!KWindowSystem::isPlatformX11()) { | ||
988 | return true; | 971 | return true; | ||
▲ Show 20 Lines • Show All 289 Lines • Show Last 20 Lines |