Răsfoiți Sursa

fix: reposition clock to right (#1181)

Saish Pawar 2 luni în urmă
părinte
comite
505e7abda2
3 a modificat fișierele cu 8 adăugiri și 7 ștergeri
  1. 5 4
      src/gui/src/UI/UIDesktop.js
  2. 1 1
      src/gui/src/css/style.css
  3. 2 2
      src/gui/src/helpers.js

+ 5 - 4
src/gui/src/UI/UIDesktop.js

@@ -1103,12 +1103,9 @@ async function UIDesktop(options){
     let ht = '';
     ht += `<div class="toolbar" style="height:${window.toolbar_height}px; min-height:${window.toolbar_height}px; max-height:${window.toolbar_height}px;">`;
         // logo
-        ht += `<div id="toolbar-first" class="toolbar-btn toolbar-puter-logo" title="Puter" style="margin-left: 10px;"><img src="${window.icons['logo-white.svg']}" draggable="false" style="display:block; width:17px; height:17px"></div>`;
+        ht += `<div class="toolbar-btn toolbar-puter-logo" title="Puter" style="margin-left: 10px;"><img src="${window.icons['logo-white.svg']}" draggable="false" style="display:block; width:17px; height:17px"></div>`;
       
     
-        //clock 
-    ht += `<div id="clock" class="toolbar-clock" style="margin-left: 10px; margin-right: auto">12:00 AM Sun, Jan 01</div>`;
-
     // clock spacer
     ht += `<div class="toolbar-spacer"></div>`;
     
@@ -1141,6 +1138,10 @@ async function UIDesktop(options){
         // search button
         ht += `<div class="toolbar-btn search-btn" title="Search" style="background-image:url('${window.icons['search.svg']}')"></div>`;
 
+    
+        //clock 
+        ht += `<div id="clock" class="toolbar-clock" style="">12:00 AM Sun, Jan 01</div>`;
+
         // user options menu
         ht += `<div class="toolbar-btn user-options-menu-btn profile-pic" style="display:block;">`;
             ht += `<div class="profile-image ${window.user?.profile?.picture && 'profile-image-has-picture'}" style="border-radius: 50%; background-image:url(${window.user?.profile?.picture || window.icons['profile.svg']}); box-sizing: border-box; width: 17px !important; height: 17px !important; background-size: contain; background-repeat: no-repeat; background-position: center; background-position: center; background-size: cover;"></div>`;

+ 1 - 1
src/gui/src/css/style.css

@@ -2401,7 +2401,7 @@ label {
     color: white;
     font-size: 13px;
     background-color: #00000056;
-    
+    margin-left: 20px;
     /* prevent clock from moving other taskbar items */
     height: 22px;
     line-height: 22px;

+ 2 - 2
src/gui/src/helpers.js

@@ -2551,8 +2551,8 @@ window.change_clock_visible = (clock_visible) => {
     
     newValue === 'auto' && window.is_fullscreen() ? $('#clock').show() : $('#clock').hide();
 
-    newValue === 'show' && $('#clock').show() && $('#toolbar-first').css('margin-right', '');
-    newValue === 'hide' && $('#clock').hide() &&  $('#toolbar-first').css('margin-right', 'auto');
+    newValue === 'show' && $('#clock').show();
+    newValue === 'hide' && $('#clock').hide();
 
     if(clock_visible) {
         // save clock_visible to user preferences