diff options
author | Peter Kim <pk15950@gmail.com> | 2022-09-08 07:00:43 +0300 |
---|---|---|
committer | Peter Kim <pk15950@gmail.com> | 2022-09-08 07:00:43 +0300 |
commit | e83f88c951e26b01893acee4f24b40a46062a41c (patch) | |
tree | 09f60bf7d4fc2ae1ef50668823e416fc675b252e /sun_position/ui_sun.py | |
parent | ec84e3294593e2e26475f18c81e847bf00dc201e (diff) | |
parent | 0cd92169d40ae1c7e103ff269e850eaf1b901646 (diff) |
Merge branch 'master' into xr-devxr-dev
Diffstat (limited to 'sun_position/ui_sun.py')
-rw-r--r-- | sun_position/ui_sun.py | 45 |
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() |