Use themeable colors in Solid, Xray & Layer view

This commit is contained in:
fieldOfView 2017-01-23 20:08:45 +01:00
parent 32823a0183
commit 45c8083423
6 changed files with 72 additions and 33 deletions

View file

@ -1,6 +1,7 @@
# Copyright (c) 2015 Ultimaker B.V.
# Cura is released under the terms of the AGPLv3 or higher.
from UM.Application import Application
from UM.Scene.SceneNode import SceneNode
from UM.Resources import Resources
from UM.Math.Color import Color
@ -23,7 +24,7 @@ class ConvexHullNode(SceneNode):
self._original_parent = parent
# Color of the drawn convex hull
self._color = Color(0.4, 0.4, 0.4, 1.0)
self._color = None
# The y-coordinate of the convex hull mesh. Must not be 0, to prevent z-fighting.
self._mesh_height = 0.1
@ -72,7 +73,7 @@ class ConvexHullNode(SceneNode):
return True
def _onNodeDecoratorsChanged(self, node):
self._color = Color(35, 35, 35, 0.5)
self._color = Color(*Application.getInstance().getTheme().getColor("convex_hull").getRgb())
convex_hull_head = self._node.callDecoration("getConvexHullHead")
if convex_hull_head: