|
34 | 34 | 'autosave_interval': 5, # seconds (min: 3, max: 60) |
35 | 35 | 'font_size': 11, # points (8-24) |
36 | 36 | 'pdf_format': 'markdown', # 'markdown' or 'visual' |
| 37 | + 'ui_scale_factor': 1.25, # UI scale (1.25 = 125%, most stable) |
37 | 38 |
|
38 | 39 | # Theme |
39 | 40 | 'dark_mode': False, |
|
74 | 75 | # ============================================================ |
75 | 76 | # DEBUG SETTINGS - Console output control |
76 | 77 | # ============================================================ |
77 | | -DEBUG_ENABLED = True # Master debug flag - set True for development only |
78 | | -DEPLOY_BUILD = 11 # Incremented by deploy script - verifies fresh deployment |
| 78 | +DEBUG_ENABLED = False # Master debug flag - set True for development only |
| 79 | +DEPLOY_BUILD = 33 # Incremented by deploy script - verifies fresh deployment |
79 | 80 |
|
80 | 81 | def debug_print(msg: str) -> None: |
81 | 82 | """Print debug message only if DEBUG_ENABLED is True.""" |
@@ -150,6 +151,19 @@ def debug_print(msg: str) -> None: |
150 | 151 | 'padding_bottom': 4, # Bottom gap |
151 | 152 | } |
152 | 153 |
|
| 154 | +# ============================================================ |
| 155 | +# IMAGE HANDLING DEFAULTS |
| 156 | +# ============================================================ |
| 157 | +IMAGE_DEFAULTS = { |
| 158 | + 'folder_name': 'images', # Subfolder in .kinotes/ |
| 159 | + 'max_size_kb': 2048, # Max image size (2MB) |
| 160 | + 'max_dimension': 1920, # Max width/height (resize if larger) |
| 161 | + 'thumbnail_size': 400, # Display size in editor |
| 162 | + 'supported_formats': ['png', 'jpg', 'jpeg', 'gif', 'bmp', 'webp'], |
| 163 | + 'default_format': 'png', # Save format for clipboard images |
| 164 | + 'quality': 85, # JPEG quality (1-100) |
| 165 | +} |
| 166 | + |
153 | 167 | # ============================================================ |
154 | 168 | # DESIGNATOR PREFIXES (IEEE 315 / Industry Standard) |
155 | 169 | # ============================================================ |
@@ -289,13 +303,44 @@ def debug_print(msg: str) -> None: |
289 | 303 | # ============================================================ |
290 | 304 | # DEBUG MODULES - Default states |
291 | 305 | # ============================================================ |
| 306 | +# Set True to enable debug output for specific modules |
| 307 | +# This allows focused debugging without console spam |
292 | 308 | DEBUG_MODULES = { |
293 | | - 'save': False, |
294 | | - 'net': False, |
295 | | - 'designator': False, |
| 309 | + # Core modules |
| 310 | + 'image': True, # Image handler - paste, save, load |
| 311 | + 'pdf': True, # PDF export |
| 312 | + 'md_export': True, # Markdown export (RichText → MD) |
| 313 | + 'md_import': True, # Markdown import (MD → RichText) |
| 314 | + |
| 315 | + # UI modules |
| 316 | + 'save': False, # Save operations |
| 317 | + 'click': False, # Click events |
| 318 | + 'size': False, # Window sizing |
| 319 | + 'editor': False, # Visual editor operations |
| 320 | + |
| 321 | + # Crossprobe |
| 322 | + 'net': False, # Net linker |
| 323 | + 'designator': False, # Designator linker |
296 | 324 | } |
297 | 325 |
|
298 | 326 |
|
| 327 | +def debug_module(module: str, msg: str) -> None: |
| 328 | + """ |
| 329 | + Print debug message only if module is enabled. |
| 330 | + |
| 331 | + Usage: |
| 332 | + debug_module('image', f"Saved: {filename}") |
| 333 | + debug_module('pdf', f"Exporting to: {path}") |
| 334 | + |
| 335 | + Args: |
| 336 | + module: Module key from DEBUG_MODULES |
| 337 | + msg: Message to print (without [KiNotes] prefix) |
| 338 | + """ |
| 339 | + if DEBUG_ENABLED and DEBUG_MODULES.get(module, False): |
| 340 | + prefix = module.upper() |
| 341 | + print(f"[KiNotes {prefix}] {msg}") |
| 342 | + |
| 343 | + |
299 | 344 | # ============================================================ |
300 | 345 | # HELPER FUNCTIONS |
301 | 346 | # ============================================================ |
@@ -336,3 +381,24 @@ def get_version_log_template() -> dict: |
336 | 381 |
|
337 | 382 |
|
338 | 383 |
|
| 384 | + |
| 385 | + |
| 386 | + |
| 387 | + |
| 388 | + |
| 389 | + |
| 390 | + |
| 391 | + |
| 392 | + |
| 393 | + |
| 394 | + |
| 395 | + |
| 396 | + |
| 397 | + |
| 398 | + |
| 399 | + |
| 400 | + |
| 401 | + |
| 402 | + |
| 403 | + |
| 404 | + |
0 commit comments