This repository has been archived by the owner on Mar 3, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Redcxx
committed
Aug 30, 2019
1 parent
04a1f65
commit 2907b76
Showing
11 changed files
with
131 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,28 +4,19 @@ | |
import settings | ||
from login import LoginScreen | ||
from pikaxhandler import PikaxHandler | ||
from common import center | ||
|
||
|
||
# [email protected] | ||
|
||
# https://stackoverflow.com/questions/3352918/how-to-center-a-window-on-the-screen-in-tkinter | ||
def center(win): | ||
win.update_idletasks() | ||
width = win.winfo_width() | ||
height = win.winfo_height() | ||
x = (win.winfo_screenwidth() // 2) - (width // 2) | ||
y = (win.winfo_screenheight() // 2) - (height // 2) | ||
win.geometry('{}x{}+{}+{}'.format(width, height, x, y)) | ||
|
||
|
||
def main(): | ||
root = Tk() | ||
root.configure(borderwidth=0, highlightthickness=0) | ||
root.geometry('{}x{}'.format(settings.MAIN_WINDOW_WIDTH, settings.MAIN_WINDOW_HEIGHT)) | ||
root.configure(borderwidth=0, highlightthickness=0) | ||
root.title(settings.PIKAX_DOWNLOADER_TITLE) | ||
root.resizable(False, False) | ||
root.protocol("WM_DELETE_WINDOW", root.destroy) | ||
center(root) | ||
root.protocol("WM_DELETE_WINDOW", root.destroy) | ||
LoginScreen(master=root, pikax_handler=PikaxHandler()) | ||
root.mainloop() | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.