Skip to content

Commit

Permalink
Improve crossword editor
Browse files Browse the repository at this point in the history
Added the option to view the crossword in the file explorer, and improved some sizing issues.
  • Loading branch information
tomasvana10 committed Jun 26, 2024
1 parent d2d8341 commit d9ce6c5
Show file tree
Hide file tree
Showing 4 changed files with 119 additions and 76 deletions.
5 changes: 2 additions & 3 deletions crossword_puzzle/base.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import annotations

from configparser import ConfigParser
from platform import system
from typing import Dict, List, Tuple
Expand All @@ -26,6 +24,7 @@ def _set_fonts(self) -> None:
self.TITLE_FONT = CTkFont(size=31, weight="bold", slant="roman")
self.SUBHEADING_FONT = CTkFont(size=24, weight="normal", slant="roman")
self.TEXT_FONT = CTkFont(size=15, weight="normal", slant="roman")
self.ITALIC_TEXT_FONT = CTkFont(size=15, weight="bold", slant="roman")
self.BOLD_TEXT_FONT = CTkFont(size=15, weight="bold", slant="roman")
self.CATEGORY_FONT = CTkFont(size=23, weight="bold", slant="roman")
self.BLOCK_FONT = CTkFont(size=18, weight="normal", slant="roman")
Expand Down Expand Up @@ -55,7 +54,7 @@ def _confirm_route(
def _route(
self,
page_ref: str, # Reference to page instance
base: Base, # Reference to base instance
base: "Base", # Reference to base instance
title: str, # Title of the new page
**kwargs,
) -> bool:
Expand Down
14 changes: 1 addition & 13 deletions crossword_puzzle/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,19 +96,7 @@ class Dark:
"https://api.github.com/repos/tomasvana10/crossword_puzzle/releases/latest"
)
DIM = (900, 650)
EDITOR_DIM = (1125, 650)
PREV_SCALE_MAP: Dict[str, float] = {
# Scale the crossword/word preview in the editor based on CTk scaling
"0.7": 0.85,
"0.8": 0.75,
"0.9": 0.65,
"1.0": 0.6,
"1.1": 0.55,
"1.2": 0.52,
"1.3": 0.45,
"1.4": 0.4,
"1.5": 0.4,
}
EDITOR_DIM = (1125, 600)
PAGE_MAP: Dict[str, str] = {
"HomePage": "Crossword Puzzle",
"BrowserPage": "Crossword Browser",
Expand Down
Loading

0 comments on commit d9ce6c5

Please sign in to comment.