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 debug: null
property Item environment: null
property Item indexer: null
property Item indicators: null
property Item launchers: null

@ -73,7 +73,7 @@ Item{
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 disableThicknessScale: false
@ -365,7 +365,7 @@ Item{
anchors.fill: _wrapperContainer
active: appletItem.applet
&& graphicsSystem.isAccelerated
&& appletItem.environment.isGraphicsSystemAccelerated
&& !appletColorizer.mustBeShown
&& (appletItem.myView.itemShadow.isEnabled && !appletItem.communicator.indexerIsSupported)

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

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

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

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

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

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

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

@ -198,12 +198,6 @@ Item{
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{
anchors.fill: parent
active: abilityItem.abilities.debug.graphicsEnabled
@ -261,7 +255,9 @@ Item{
Loader{
id: separatorShadow
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
Behavior on opacity {

@ -135,7 +135,9 @@ Item{
//! Shadows
Loader{
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{
anchors.fill: parent

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

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

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

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

Loading…
Cancel
Save