Skip to content

Commit

Permalink
Round current time label to ms to prevent adjusting size of sidebar i…
Browse files Browse the repository at this point in the history
…n Qt depending on resolution.
  • Loading branch information
Carifio24 committed Mar 21, 2024
1 parent 917ba70 commit 299c30f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion glue_wwt/viewer/options_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def _update_slider_fraction(self, *args):
def _on_current_time_update(self, time):
self._update_slider_fraction()
try:
self.ui.label_current_time.setText(f"Current Time: {time}")
self.ui.label_current_time.setText(f"Current Time: {time.astype('datetime64[ms]')}")
except:
pass

Expand Down
18 changes: 9 additions & 9 deletions glue_wwt/viewer/options_widget.ui
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@
</property>
<property name="dateTime">
<datetime>
<hour>6</hour>
<hour>12</hour>
<minute>0</minute>
<second>0</second>
<year>2000</year>
Expand All @@ -604,17 +604,17 @@
</property>
<property name="maximumDateTime">
<datetime>
<hour>5</hour>
<hour>11</hour>
<minute>59</minute>
<second>58</second>
<year>10000</year>
<month>1</month>
<day>1</day>
<year>9999</year>
<month>12</month>
<day>31</day>
</datetime>
</property>
<property name="minimumDateTime">
<datetime>
<hour>12</hour>
<hour>18</hour>
<minute>0</minute>
<second>0</second>
<year>1752</year>
Expand All @@ -624,14 +624,14 @@
</property>
<property name="maximumTime">
<time>
<hour>5</hour>
<hour>11</hour>
<minute>59</minute>
<second>58</second>
</time>
</property>
<property name="minimumTime">
<time>
<hour>12</hour>
<hour>18</hour>
<minute>0</minute>
<second>0</second>
</time>
Expand Down Expand Up @@ -660,7 +660,7 @@
<bool>false</bool>
</property>
<property name="timeSpec">
<enum>Qt::LocalTime</enum>
<enum>Qt::UTC</enum>
</property>
</widget>
</item>
Expand Down

0 comments on commit 299c30f

Please sign in to comment.