isGraphicsSystemAccelerated at Environment Ability

work/spdx
Michail Vourlakos 4 years ago
parent cf1b17437e
commit 1d7e939356

@ -305,6 +305,7 @@ Item {
property Item animations: null property Item animations: null
property Item debug: null property Item debug: null
property Item environment: null
property Item indexer: null property Item indexer: null
property Item indicators: null property Item indicators: null
property Item launchers: null property Item launchers: null

@ -73,7 +73,7 @@ Item{
return communicator.parabolicEffectIsSupported ? appletPreferredThickness : scaledThickness + appletItem.metrics.margin.screenEdge; return communicator.parabolicEffectIsSupported ? appletPreferredThickness : scaledThickness + appletItem.metrics.margin.screenEdge;
} }
opacity: appletColorizer.mustBeShown && graphicsSystem.isAccelerated ? 0 : 1 opacity: appletColorizer.mustBeShown && appletItem.environment.isGraphicsSystemAccelerated ? 0 : 1
property bool disableLengthScale: false property bool disableLengthScale: false
property bool disableThicknessScale: false property bool disableThicknessScale: false
@ -365,7 +365,7 @@ Item{
anchors.fill: _wrapperContainer anchors.fill: _wrapperContainer
active: appletItem.applet active: appletItem.applet
&& graphicsSystem.isAccelerated && appletItem.environment.isGraphicsSystemAccelerated
&& !appletColorizer.mustBeShown && !appletColorizer.mustBeShown
&& (appletItem.myView.itemShadow.isEnabled && !appletItem.communicator.indexerIsSupported) && (appletItem.myView.itemShadow.isEnabled && !appletItem.communicator.indexerIsSupported)

@ -80,7 +80,8 @@ Loader{
sourceComponent: Item{ sourceComponent: Item{
Loader{ Loader{
anchors.fill: appletNumber anchors.fill: appletNumber
active: appletItem.myView.itemShadow.isEnabled && graphicsSystem.isAccelerated active: appletItem.myView.itemShadow.isEnabled
&& appletItem.environment.isGraphicsSystemAccelerated
sourceComponent: DropShadow{ sourceComponent: DropShadow{
color: appletItem.myView.itemShadow.shadowColor color: appletItem.myView.itemShadow.shadowColor

@ -36,7 +36,9 @@ Item {
id: colorizedAppletShadow id: colorizedAppletShadow
anchors.fill: colorizer anchors.fill: colorizer
active: graphicsSystem.isAccelerated && plasmoid.configuration.appletShadowsEnabled && (appletColorizer.opacity>0) active: appletItem.environment.isGraphicsSystemAccelerated
&& plasmoid.configuration.appletShadowsEnabled
&& (appletColorizer.opacity>0)
sourceComponent: DropShadow{ sourceComponent: DropShadow{
anchors.fill: parent anchors.fill: parent

@ -143,6 +143,7 @@ Item{
readonly property Item actions: Actions{} readonly property Item actions: Actions{}
readonly property Item applet: mainCommunicator.requires readonly property Item applet: mainCommunicator.requires
readonly property alias containment: _containment.publicApi readonly property alias containment: _containment.publicApi
readonly property Item environment: appletItem.environment.publicApi
readonly property Item debug: appletItem.debug.publicApi readonly property Item debug: appletItem.debug.publicApi
readonly property Item indicators: appletItem.indicators.publicApi readonly property Item indicators: appletItem.indicators.publicApi
readonly property Item metrics: appletItem.metrics.publicApi readonly property Item metrics: appletItem.metrics.publicApi

@ -72,7 +72,7 @@ Loader{
&& latteView.windowsTracker.currentScreen.touchingWindowScheme) && latteView.windowsTracker.currentScreen.touchingWindowScheme)
property QtObject applyTheme: { property QtObject applyTheme: {
if (!graphicsSystem.isAccelerated) { if (!root.environment.isGraphicsSystemAccelerated) {
return theme; return theme;
} }

@ -408,7 +408,7 @@ MouseArea {
height: width height: width
anchors.centerIn: parent anchors.centerIn: parent
opacity: 0.9 opacity: 0.9
layer.enabled: graphicsSystem.isAccelerated layer.enabled: root.environment.isGraphicsSystemAccelerated
layer.effect: DropShadow { layer.effect: DropShadow {
radius: root.myView.itemShadow.size radius: root.myView.itemShadow.size
fast: true fast: true

@ -28,6 +28,8 @@ import org.kde.plasma.components 2.0 as PlasmaComponents
import org.kde.kquickcontrolsaddons 2.0 import org.kde.kquickcontrolsaddons 2.0
import org.kde.plasma.plasmoid 2.0 import org.kde.plasma.plasmoid 2.0
import org.kde.latte.abilities.host 0.1 as AbilityHost
import org.kde.latte.core 0.2 as LatteCore import org.kde.latte.core 0.2 as LatteCore
import org.kde.latte.components 1.0 as LatteComponents import org.kde.latte.components 1.0 as LatteComponents
import org.kde.latte.private.app 0.1 as LatteApp import org.kde.latte.private.app 0.1 as LatteApp
@ -326,6 +328,7 @@ Item {
readonly property alias autosize: _autosize readonly property alias autosize: _autosize
readonly property alias background: _background readonly property alias background: _background
readonly property alias debug: _debug readonly property alias debug: _debug
readonly property alias environment: _environment
readonly property alias indexer: _indexer readonly property alias indexer: _indexer
readonly property alias indicators: _indicators readonly property alias indicators: _indicators
readonly property alias layouter: _layouter readonly property alias layouter: _layouter
@ -930,6 +933,7 @@ Item {
Applet.AppletItem{ Applet.AppletItem{
animations: _animations animations: _animations
debug: _debug debug: _debug
environment: _environment
indexer: _indexer indexer: _indexer
indicators: _indicators indicators: _indicators
launchers: _launchers launchers: _launchers
@ -944,12 +948,6 @@ Item {
} }
} }
Item {
id: graphicsSystem
readonly property bool isAccelerated: (GraphicsInfo.api !== GraphicsInfo.Software)
&& (GraphicsInfo.api !== GraphicsInfo.Unknown)
}
Upgrader { Upgrader {
id: upgrader id: upgrader
} }
@ -1136,6 +1134,10 @@ Item {
id: _debug id: _debug
} }
AbilityHost.Environment{
id: _environment
}
Ability.Indexer { Ability.Indexer {
id: _indexer id: _indexer
layouts: layoutsContainer layouts: layoutsContainer

@ -64,6 +64,7 @@ Item {
readonly property alias animations: _animations readonly property alias animations: _animations
readonly property alias containment: _containment readonly property alias containment: _containment
readonly property alias debug: _debug readonly property alias debug: _debug
readonly property alias environment: _environment
readonly property alias indexer: _indexer readonly property alias indexer: _indexer
readonly property alias indicators: _indicators readonly property alias indicators: _indicators
readonly property alias metrics: _metrics readonly property alias metrics: _metrics
@ -89,6 +90,11 @@ Item {
bridge: _abilityContainer.bridge bridge: _abilityContainer.bridge
} }
AbilityClient.Environment {
id: _environment
bridge: _abilityContainer.bridge
}
AbilityClient.Indexer { AbilityClient.Indexer {
id: _indexer id: _indexer
bridge: _abilityContainer.bridge bridge: _abilityContainer.bridge

@ -198,12 +198,6 @@ Item{
NumberAnimation { duration: abilityItem.abilities.animations.speedFactor.current * abilityItem.abilities.animations.duration.large } NumberAnimation { duration: abilityItem.abilities.animations.speedFactor.current * abilityItem.abilities.animations.duration.large }
} }
Item {
id: graphicsSystem
readonly property bool isAccelerated: (GraphicsInfo.api !== GraphicsInfo.Software)
&& (GraphicsInfo.api !== GraphicsInfo.Unknown)
}
Loader{ Loader{
anchors.fill: parent anchors.fill: parent
active: abilityItem.abilities.debug.graphicsEnabled active: abilityItem.abilities.debug.graphicsEnabled
@ -261,7 +255,9 @@ Item{
Loader{ Loader{
id: separatorShadow id: separatorShadow
anchors.fill: separatorItem anchors.fill: separatorItem
active: abilityItem.abilities.myView.itemShadow.isEnabled && isSeparator && graphicsSystem.isAccelerated active: abilityItem.abilities.myView.itemShadow.isEnabled
&& isSeparator
&& abilityItem.abilities.environment.isGraphicsSystemAccelerated
opacity: separatorItem.forceHiddenState ? 0 : 0.4 opacity: separatorItem.forceHiddenState ? 0 : 0.4
Behavior on opacity { Behavior on opacity {

@ -135,7 +135,9 @@ Item{
//! Shadows //! Shadows
Loader{ Loader{
anchors.fill: _contentItemContainer anchors.fill: _contentItemContainer
active: abilityItem.abilities.myView.itemShadow.isEnabled && !abilityItem.isSeparator && graphicsSystem.isAccelerated active: abilityItem.abilities.myView.itemShadow.isEnabled
&& !abilityItem.isSeparator
&& abilityItem.abilities.environment.isGraphicsSystemAccelerated
sourceComponent: DropShadow{ sourceComponent: DropShadow{
anchors.fill: parent anchors.fill: parent

@ -65,7 +65,8 @@ Loader{
sourceComponent: Item{ sourceComponent: Item{
Loader{ Loader{
anchors.fill: taskNumber anchors.fill: taskNumber
active: abilityItem.abilities.myView.itemShadow.isEnabled && graphicsSystem.isAccelerated active: abilityItem.abilities.myView.itemShadow.isEnabled
&& abilityItem.abilities.environment.isGraphicsSystemAccelerated
sourceComponent: DropShadow{ sourceComponent: DropShadow{
color: abilityItem.abilities.myView.itemShadow.shadowColor color: abilityItem.abilities.myView.itemShadow.shadowColor

@ -280,13 +280,6 @@ Item {
id: colorScopePalette id: colorScopePalette
} }
//!
Item {
id: graphicsSystem
readonly property bool isAccelerated: (GraphicsInfo.api !== GraphicsInfo.Software)
&& (GraphicsInfo.api !== GraphicsInfo.Unknown)
}
///UPDATE ///UPDATE
function updateListViewParent() { function updateListViewParent() {
if (scrollingEnabled) { if (scrollingEnabled) {

@ -135,7 +135,7 @@ Item {
Loader{ Loader{
id: badgesLoader id: badgesLoader
anchors.fill: taskIconContainer anchors.fill: taskIconContainer
active: (activateProgress > 0) && graphicsSystem.isAccelerated active: (activateProgress > 0) && taskItem.abilities.environment.isGraphicsSystemAccelerated
asynchronous: true asynchronous: true
opacity: stateColorizer.opacity > 0 ? 0 : 1 opacity: stateColorizer.opacity > 0 ? 0 : 1
@ -316,7 +316,8 @@ Item {
opacity: badgesLoader.activateProgress opacity: badgesLoader.activateProgress
visible: badgesLoader.showInfo || badgesLoader.showProgress visible: badgesLoader.showInfo || badgesLoader.showProgress
layer.enabled: taskItem.abilities.myView.itemShadow.isEnabled && graphicsSystem.isAccelerated layer.enabled: taskItem.abilities.myView.itemShadow.isEnabled
&& taskItem.abilities.environment.isGraphicsSystemAccelerated
layer.effect: DropShadow { layer.effect: DropShadow {
color: taskItem.abilities.myView.itemShadow.shadowColor color: taskItem.abilities.myView.itemShadow.shadowColor
fast: true fast: true
@ -333,7 +334,8 @@ Item {
opacity: badgesLoader.activateProgress opacity: badgesLoader.activateProgress
visible: badgesLoader.showAudio visible: badgesLoader.showAudio
layer.enabled: taskItem.abilities.myView.itemShadow.isEnabled && graphicsSystem.isAccelerated layer.enabled: taskItem.abilities.myView.itemShadow.isEnabled
&& taskItem.abilities.environment.isGraphicsSystemAccelerated
layer.effect: DropShadow { layer.effect: DropShadow {
color: taskItem.abilities.myView.itemShadow.shadowColor color: taskItem.abilities.myView.itemShadow.shadowColor
fast: true fast: true
@ -357,7 +359,8 @@ Item {
//! when the latte view is removed //! when the latte view is removed
Loader { Loader {
anchors.fill: parent anchors.fill: parent
active: badgeVisualsLoader.active && graphicsSystem.isAccelerated active: badgeVisualsLoader.active
&& taskItem.abilities.environment.isGraphicsSystemAccelerated
sourceComponent: Colorize{ sourceComponent: Colorize{
source: badgeVisualsLoader.item source: badgeVisualsLoader.item

@ -70,7 +70,8 @@ Item{
Loader{ Loader{
id: tempTaskShadow id: tempTaskShadow
anchors.fill: tempRemoveIcon anchors.fill: tempRemoveIcon
active: taskItem.abilities.myView.itemShadow.isEnabled && graphicsSystem.isAccelerated active: taskItem.abilities.myView.itemShadow.isEnabled
&& taskItem.abilities.environment.isGraphicsSystemAccelerated
sourceComponent: DropShadow{ sourceComponent: DropShadow{
anchors.fill: parent anchors.fill: parent

Loading…
Cancel
Save