This commit is contained in:
Auric Vente 2024-07-22 08:59:24 -06:00
parent 1dee91fc28
commit bb9606bb46
2 changed files with 4 additions and 6 deletions

View File

@ -51,7 +51,6 @@ class Config:
input_caret_color: str = "rgb(18, 18, 18)" input_caret_color: str = "rgb(18, 18, 18)"
settings_json: Path settings_json: Path
countries_json: Path countries_json: Path
filter_width: int = 150
filter_debouncer_delay: int = 200 filter_debouncer_delay: int = 200
default_population: int = 100 default_population: int = 100
merge_goal: int = 10 merge_goal: int = 10

View File

@ -250,15 +250,14 @@ class Window:
Window.mode.currentIndexChanged.connect(Game.update_mode) Window.mode.currentIndexChanged.connect(Game.update_mode)
Window.filter = FilterLineEdit() Window.filter = FilterLineEdit()
Window.filter.setFixedWidth(Config.filter_width)
Window.filter.setPlaceholderText("Filter") Window.filter.setPlaceholderText("Filter")
Window.filter.mousePressEvent = lambda e: Window.to_top() Window.filter.mousePressEvent = lambda e: Window.to_top()
Window.filter.keyReleaseEvent = lambda e: Filter.filter(e) Window.filter.keyReleaseEvent = lambda e: Filter.filter(e)
container.addWidget(btn_restart) container.addWidget(btn_restart, 1)
container.addWidget(Window.speed) container.addWidget(Window.speed, 1)
container.addWidget(Window.mode) container.addWidget(Window.mode, 1)
container.addWidget(Window.filter) container.addWidget(Window.filter, 1)
root.setLayout(container) root.setLayout(container)
Window.root.addWidget(root) Window.root.addWidget(root)