mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Use themeable colors in Solid, Xray & Layer view
This commit is contained in:
parent
32823a0183
commit
45c8083423
6 changed files with 72 additions and 33 deletions
|
@ -11,7 +11,7 @@ from UM.View.Renderer import Renderer
|
|||
from UM.Settings.Validator import ValidatorState
|
||||
|
||||
from UM.View.GL.OpenGL import OpenGL
|
||||
|
||||
import UM.Qt.Bindings.Theme
|
||||
import cura.Settings
|
||||
from cura.Settings.ExtruderManager import ExtruderManager
|
||||
|
||||
|
@ -38,8 +38,9 @@ class SolidView(View):
|
|||
|
||||
if not self._disabled_shader:
|
||||
self._disabled_shader = OpenGL.getInstance().createShaderProgram(Resources.getPath(Resources.Shaders, "striped.shader"))
|
||||
self._disabled_shader.setUniformValue("u_diffuseColor1", [0.48, 0.48, 0.48, 1.0])
|
||||
self._disabled_shader.setUniformValue("u_diffuseColor2", [0.68, 0.68, 0.68, 1.0])
|
||||
theme = Application.getInstance().getTheme()
|
||||
self._disabled_shader.setUniformValue("u_diffuseColor1", theme.getColor("model_unslicable").getRgbF())
|
||||
self._disabled_shader.setUniformValue("u_diffuseColor2", theme.getColor("model_unslicable_alt").getRgbF())
|
||||
self._disabled_shader.setUniformValue("u_width", 50.0)
|
||||
|
||||
multi_extrusion = False
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue