mirror of
https://github.com/KDE/latte-dock.git
synced 2024-12-24 17:33:50 +03:00
smoothen anim for hide length screen gaps
This commit is contained in:
parent
4b909796a4
commit
02e1e87d59
@ -64,6 +64,7 @@ void Effects::init()
|
||||
});
|
||||
|
||||
connect(m_view, &Latte::View::alignmentChanged, this, &Effects::updateEnabledBorders);
|
||||
connect(m_view, &Latte::View::maxLengthChanged, this, &Effects::updateEnabledBorders);
|
||||
connect(m_view, &Latte::View::screenEdgeMarginEnabledChanged, this, &Effects::updateEnabledBorders);
|
||||
connect(m_view, &Latte::View::behaveAsPlasmaPanelChanged, this, &Effects::updateEffects);
|
||||
connect(this, &Effects::drawShadowsChanged, this, &Effects::updateShadows);
|
||||
|
@ -201,11 +201,7 @@ Item {
|
||||
&& latteView && latteView.windowsTracker
|
||||
&& latteView.windowsTracker.currentScreen.existsWindowMaximized
|
||||
|
||||
property bool hideLengthScreenGaps: hideThickScreenGap
|
||||
&& (latteView.visibility.mode === LatteCore.Types.AlwaysVisible
|
||||
|| latteView.visibility.mode === LatteCore.Types.WindowsGoBelow)
|
||||
&& (plasmoid.configuration.alignment === LatteCore.Types.Justify)
|
||||
&& plasmoid.configuration.maxLength>85
|
||||
property bool hideLengthScreenGaps: false /*set through binding*/
|
||||
|
||||
|
||||
property int themeColors: plasmoid.configuration.themeColors
|
||||
@ -469,6 +465,24 @@ Item {
|
||||
|
||||
////////////////END properties
|
||||
|
||||
//////////////START OF BINDINGS
|
||||
|
||||
//! Binding is needed in order for hideLengthScreenGaps to be activated or not only after
|
||||
//! View sliding in/out has finished. This way the animation is smoother for behaveAsPlasmaPanels
|
||||
Binding{
|
||||
target: root
|
||||
property: "hideLengthScreenGaps"
|
||||
when: latteView && latteView.positioner && latteView.visibility && (latteView.positioner.slideOffset === 0)
|
||||
value: (hideThickScreenGap
|
||||
&& (latteView.visibility.mode === LatteCore.Types.AlwaysVisible
|
||||
|| latteView.visibility.mode === LatteCore.Types.WindowsGoBelow)
|
||||
&& (plasmoid.configuration.alignment === LatteCore.Types.Justify)
|
||||
&& plasmoid.configuration.maxLength>85)
|
||||
}
|
||||
|
||||
//////////////END OF BINDINGS
|
||||
|
||||
|
||||
//////////////START OF CONNECTIONS
|
||||
onEditModeChanged: {
|
||||
if (!editMode) {
|
||||
|
Loading…
Reference in New Issue
Block a user