Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Bryce Palmer
    @everettraven
    Also that specific API is only available in Windows 10 1703 and above. the issue i see is the win_version variable only contains an integer stating something such as "10" and not the build. There is another function that is SetProcessDpiAwareness that the newer SetProcessDpiAwarenessContextis meant to improve. The benefit in using SetProcessDpiAwareness is that its minimum supported is the first build of Windows 8.1 which would give us the ability to say any windows version after 8 use this function
    Russell Keith-Magee
    @freakboy3742
    Ok - but it’s a literal “new in Win10.1703” function - it won’t exist on older builds, so the AttributeError should (tm) be reliable, as far as you can see?
    Bryce Palmer
    @everettraven
    As far as i can see yes
    Which may make it the best option
    Russell Keith-Magee
    @freakboy3742
    Let me see if SetProcessDpiAwareness works for me...
    Nope - that one doesn’t exist either.
    Bryce Palmer
    @everettraven
    It probably wont right out the gate because it is in shcore.dll
    the others are in win32.dll
    Russell Keith-Magee
    @freakboy3742
    Ah - do we need to load another dll, then?
    Bryce Palmer
    @everettraven
    i can do some tinkering with that and then get back to you it a bit on that
    Russell Keith-Magee
    @freakboy3742
    Thanks - much appreciated.
    Bryce Palmer
    @everettraven
    So in order to use the other windows 8 minimum supported function you do need to import the shcore dll but I noticed that for me using the setting that is currently implemented looks kinda funky with that function. There is another setting that makes it look better on my system. The function call for the setting that makes it look kinda funky for me is shcore.SetProcessDpiAwareness(True). The one that makes it look better is shcore.SetProcessDpiAwareness("true/PM")
    But the upside is that I can indeed say that that library function does work on my current windows build
    Russell Keith-Magee
    @freakboy3742
    Ok - I have no problems importing shcore, but I get an AttributeError calling SetProcessDpiAwareness
    Bryce Palmer
    @everettraven
    Hmm...
    just to make sure you did use shcore as the imported variable to call the function in app.py correct?
    instead of user32
    Russell Keith-Magee
    @freakboy3742
    Correct
    Bryce Palmer
    @everettraven
    Okay, then im not quite sure on that one
    Russell Keith-Magee
    @freakboy3742
    To clarify - this is the code that gives you the best appearance?:
            if win_version >= 6:
                try:
                    shcore.SetProcessDPIAwareness("true/PM")
                except AttributeError:
                    user32.SetProcessDPIAware(True)
    Bryce Palmer
    @everettraven
    sure is
    this is the code i currently have in there: if win_version >= 6:
    shcore.SetProcessDpiAwareness("true/PM")
            # user32.SetProcessDPIAware(True)
    ``` if win_version >= 6:
    shcore.SetProcessDpiAwareness("true/PM")
            # user32.SetProcessDPIAware(True)```
    Sorry, newer to the whole gitter markdown stuff
    Russell Keith-Magee
    @freakboy3742
    no problems :-)
    Pro tip: up arrow lets you edit your last post; the triple quotes need to be on lines of their own
    Bryce Palmer
    @everettraven
    Ahhhhhh, thank you :)
    Russell Keith-Magee
    @freakboy3742
    Oh - wait - I just noticed the capitalization difference
    In which case:
    shcore.SetProcessDpiAwareness(True)
    works for me
    “true/PM” doesn’t raise an error, but doesn’t set DPI mode
    Bryce Palmer
    @everettraven
    Does the shcore.SetProcessDpiAwareness(True) look the way it should for you?
    Russell Keith-Magee
    @freakboy3742
    Yes
    Bryce Palmer
    @everettraven
    Okay, just wanted to make sure. I wonder if it is an overall DPI issue with my screen
    Regardless, I was thinking that i could try grabbing the current windows build number and checking against that as well in the checks for setting DPI mode to ensure we are using the newest API for the user's current build
    Russell Keith-Magee
    @freakboy3742
    Sounds like a good idea (at least, more reliable than a try/catch)
    Bryce Palmer
    @everettraven
    I will get that working and then submit a PR with the fix now that we know what each one of the functions should work on.
    Bryce Palmer
    @everettraven
    Alright, I have beeware/toga#717 submitted with the fix (Can confirm toga now works for me using that fix).
    Kåre Baastrup
    @baastrup_gitlab
    Hi, what is the best way to keep myself updated regarding beeware and android support, im awaiting its getting fixed so i can start learning creating pyrhon android apps ;-)
    Russell Keith-Magee
    @freakboy3742
    @baastrup_gitlab Twitter (@pybeeware) is probably the most reliable channel for high-level announcements.
    Bryce Palmer
    @everettraven
    I went ahead and updated beeware/toga#717 and believe I implemented the changes you requested @freakboy3742
    Russell Keith-Magee
    @freakboy3742
    @everettraven /me looks
    Russell Keith-Magee
    @freakboy3742
    @everettraven All looks good (well… hideously complex, but that’s Microsoft’s fault, not yours :-)
    And merged!
    Thanks for the contribution! If you’re looking for some more DPI related fun… if you can explain beeware/toga#710, that would be most helpful
    Jeff Smith
    @whydoubt
    In case I haven't mentioned it... beeware/voc#961 (iterable unpacking, fixes some of the DEXing problems) and beeware/voc#968 (round() improvements, fixes some test suit failures w/ Python 3.7) should be ready for review.
    Russell Keith-Magee
    @freakboy3742
    @whydoubt Thanks - I’ll put those on my list to look at today
    Russell Keith-Magee
    @freakboy3742
    @whydoubt Reviewed those two; round() is merged, iterable unpacking broadly looks good, but I’ve got a couple of small questions.
    Joetib
    @Joetib
    hello please can anyone share a link to a project they've done with Batavia. I would love to read some such project codes to learn from
    Seth Russell
    @magic-lantern
    @freakboy3742 - When you have a minute, I'd like to get your input on briefcase issue 210 - beeware/briefcase#210 ahter and I have been working on it together and want to finish it up. You had previously commented on the pull request - I believe that we've addressed those. What needs to happen to get the pull request included into briefcase?