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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Window position manipulation #4851

Merged
merged 3 commits into from
Jan 17, 2017
Merged

Conversation

KeyWeeUsr
Copy link
Contributor

@KeyWeeUsr KeyWeeUsr commented Dec 28, 2016

ref #3799

from kivy.app import App
from kivy.clock import Clock
from kivy.core.window import Window


class TestApp(App):
    def show(self, dt):
        pos = Window._get_window_pos()
        Window._set_window_pos(*[p + 1 for p in pos])

    def build(self):
        Clock.schedule_interval(self.show, 0)
TestApp().run()

For now getter and setter only. Not sure if it needs to be a separate thing from Window.top for example, or if it needs to update those two properties.

@dessant @matham ? 馃構

@dessant
Copy link
Contributor

dessant commented Dec 28, 2016

@KeyWeeUsr, the existing Window coordinate properties could just have the correct values, and documenting the differences of this coordinate space.

EDIT: that could also create issues (#3766), i'm not sure. 馃敭

@KeyWeeUsr
Copy link
Contributor Author

KeyWeeUsr commented Dec 28, 2016

Yeah, well... it's SDL2 property to be specific, but if it's necessary, we could have additional kivy property that would be just inverted top or left or something.

Edit: We could have just a note that it's a matter of window creation, where the [0, 0] is at top left as it's obvious from the property names. That shouldn't be really an issue unless there is a single property named pos that would bring confusion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants