Open Zren opened 5 years ago
Quick note, the only reason why the example above worked is probably because Dialog enum used the same values.
PlasmaQuick::Dialog::NoBackground
and PlasmaCore.Types.NoBackground
= 0
PlasmaQuick::Dialog::StandardBackground
and PlasmaCore.Types.DefaultBackground / StandardBackground
= 1
https://invent.kde.org/frameworks/plasma-framework/-/blame/master/src/plasma/plasma.h#L298
enum BackgroundHints {
NoBackground = 0, /**< Not drawing a background under the applet, the applet has its own implementation */
StandardBackground = 1, /**< The standard background from the theme is drawn */
TranslucentBackground = 2, /**< An alternate version of the background is drawn, usually more translucent */
ShadowBackground = 4, /**< The applet won't have a svg background but a drop shadow of its content done via a shader */
ConfigurableBackground = 8, /** If the hint has this flag, the user is able to configure this background */
DefaultBackground = StandardBackground, /**< Default settings: both standard background */
};
https://invent.kde.org/frameworks/plasma-framework/-/blob/master/src/plasmaquick/dialog.h#L159
enum BackgroundHints {
NoBackground = 0, /**< Not drawing a background under the applet, the dialog has its own implementation */
StandardBackground = 1, /**< The standard background from the theme is drawn */
SolidBackground = 2, /**< The solid version of the background is preferred */
};
It's posible to access the default
PlasmaCore.Dialog { id: popupWindow }
by callingWindow.window
in thePlasmoid.fullRepesentation
'sonParentChanged
signal.We can then set the
backgroundHints
toPlasmaCore.Types.NoBackground
to get rid of the frame around it.