Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Feature: Always On Top #8076

Merged
merged 1 commit into from Feb 21, 2023
Merged

New Feature: Always On Top #8076

merged 1 commit into from Feb 21, 2023

Conversation

DexerBR
Copy link
Contributor

@DexerBR DexerBR commented Dec 18, 2022

Sets the window to always be on top of others.


Can be modified at runtime:

  • True → This will bring the window to the front and keep the window above the rest.
  • False → Will restore the window's default behavior.

SDL_SetWindowAlwaysOnTop is available since SDL 2.0.16.


For testing:

from kivy.config import Config
Config.set("graphics", "always_on_top", 1)  # The app will start with the window on top

from kivy.app import App
from kivy.uix.button import Button
from kivy.core.window import Window


class AlwaysOnTopApp(App):

    def build(self):

        def do(button_instance):
            Window.always_on_top = not Window.always_on_top
            button_instance.text = f"always_on_top == {Window.always_on_top}"

        b = Button(text=f"always_on_top == {Window.always_on_top}", font_size=40)
        b.bind(on_press=do)

        return b


AlwaysOnTopApp().run()

⚠️ CI is expected to fail as this issue needs to be addressed before this PR is merged.


Maintainer merge checklist

  • Title is descriptive/clear for inclusion in release notes.
  • Applied a Component: xxx label.
  • Applied the api-deprecation or api-break label.
  • Applied the release-highlight label to be highlighted in release notes.
  • Added to the milestone version it was merged into.
  • Unittests are included in PR.
  • Properly documented, including versionadded, versionchanged as needed.

@T-Dynamos
Copy link

also mitigates #8010

@misl6 misl6 self-requested a review January 22, 2023 17:10
@Neizvestnyj
Copy link

LGTM

@misl6
Copy link
Member

misl6 commented Feb 18, 2023

Hi @DexerBR ,

Good news! #8096 has been merged.

Can you please rebase on top of master so the CI can run again?

(Please be aware of the latest changes, and check the docs before testing it on your local development machine)

Copy link
Member

@misl6 misl6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

4 participants