Coder Social home page Coder Social logo

Comments (4)

da2x avatar da2x commented on September 25, 2024

Do you have a HiDPI display, by any chance?

from gnome-shell-clock-override.

shodan8192 avatar shodan8192 commented on September 25, 2024

No, I have 1920x1200 24'' monitor.

from gnome-shell-clock-override.

k4j8 avatar k4j8 commented on September 25, 2024

I have the same issue running Arch with a 1920x1080 24" monitor, but shodan8192's fix works great. I replicated the issue and the fix several times without fail by locking the computer and then logging in. Applying the fix did require logging out and then back in, although there may be easier means.

Can I submit a PR to get this fixed, at least until someone finds a better method?

shodan8192's fix:

--- extension.js.original	2020-06-22 09:25:56.969755762 -0400
+++ extension.js	2020-06-22 09:26:16.566081515 -0400
@@ -48,7 +48,7 @@
     }
     signalHandlerID = lbl.connect("notify::text", overrider);
     last = lbl.get_text();
-    overrider(lbl);
+    GLib.timeout_add(GLib.PRIORITY_DEFAULT, 1000, () => {overrider(lbl)});
 }
 
 function disable() {

from gnome-shell-clock-override.

da2x avatar da2x commented on September 25, 2024

No. I won’t except a timing based work-around. It’ll be way too fragile.

@shodan8192 and @KyleWJohnston could you try adding a second signal handler and hook it up to lbl.connect("allocation-changed", overrider)? That should call overrider again when the lbl’s dimension changes. (1–3 px changes are expected due to variable width fonts.) If that works, then we can improve on that to only double-execute overrider when the dimension shrinks.

from gnome-shell-clock-override.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.