Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sun_position/ui_sun.py')
-rw-r--r--sun_position/ui_sun.py45
1 files changed, 27 insertions, 18 deletions
diff --git a/sun_position/ui_sun.py b/sun_position/ui_sun.py
index 1f4f8f34..c6eebc33 100644
--- a/sun_position/ui_sun.py
+++ b/sun_position/ui_sun.py
@@ -112,11 +112,11 @@ class SUNPOS_PT_Panel(bpy.types.Panel):
col = flow.column(align=True)
if sp.bind_to_sun:
- prop_text="Release binding"
+ col.prop(sp, "bind_to_sun", toggle=True, icon="CONSTRAINT",
+ text="Release binding")
else:
- prop_text="Bind Texture to Sun "
- col.prop(sp, "bind_to_sun", toggle=True, icon="CONSTRAINT",
- text=prop_text)
+ col.prop(sp, "bind_to_sun", toggle=True, icon="CONSTRAINT",
+ text="Bind Texture to Sun")
row = col.row(align=True)
row.enabled = not sp.bind_to_sun
@@ -201,14 +201,12 @@ class SUNPOS_PT_Location(bpy.types.Panel):
if p.show_az_el:
col = flow.column(align=True)
- row = col.row()
- row.alignment = 'RIGHT'
- row.label(text="Azimuth: " +
- str(round(sun.azimuth, 3)) + "°")
- row = col.row()
- row.alignment = 'RIGHT'
- row.label(text="Elevation: " +
- str(round(sun.elevation, 3)) + "°")
+ split = col.split(factor=0.4, align=True)
+ split.label(text="Azimuth:")
+ split.label(text=str(round(sun.azimuth, 3)) + "°")
+ split = col.split(factor=0.4, align=True)
+ split.label(text="Elevation:")
+ split.label(text=str(round(sun.elevation, 3)) + "°")
col.separator()
if p.show_refraction:
@@ -266,16 +264,27 @@ class SUNPOS_PT_Time(bpy.types.Panel):
sp.longitude,
sp.UTC_zone)
col.alignment = 'CENTER'
- col.label(text="Local: " + lt, icon='TIME')
- col.label(text=" UTC: " + ut, icon='PREVIEW_RANGE')
+
+ split = col.split(factor=0.5, align=True)
+ split.label(text="Local:", icon='TIME')
+ split.label(text=lt)
+ split = col.split(factor=0.5, align=True)
+ split.label(text="UTC:", icon='PREVIEW_RANGE')
+ split.label(text=ut)
col.separator()
+
col = flow.column(align=True)
col.alignment = 'CENTER'
if p.show_rise_set:
sr = format_hms(sun.sunrise.time)
ss = format_hms(sun.sunset.time)
- tsr = "Sunrise: " + sr
- tss = " Sunset: " + ss
- col.label(text=tsr, icon='LIGHT_SUN')
- col.label(text=tss, icon='SOLO_ON')
+
+ split = col.split(factor=0.5, align=True)
+ split.label(text="Sunrise:", icon='LIGHT_SUN')
+ split.label(text=sr)
+ split = col.split(factor=0.5, align=True)
+ split.label(text="Sunset:", icon='SOLO_ON')
+ split.label(text=ss)
+
+ col.separator()