Skip to content

Commit 56bb0eb

Browse files
committed
maintain similar layout across OS
1 parent 571f50b commit 56bb0eb

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

cmdcompass/gui/manpagebox.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import customtkinter as ctk
22
from tkinterweb import HtmlFrame
33
import os
4+
import platform
45
from cmdcompass.utils.utils import get_command_name, highlight_options, get_data_and_static_parent_dir
56
from cmdcompass.man_parser.loader import download_and_process_package
67
from cmdcompass.man_parser.html_coverter import OUTPUT_DIR
@@ -16,6 +17,7 @@
1617
BASE_DIR = "."
1718
HTML_CORE_DIR = os.path.join(BASE_DIR, 'data', 'man_pages', 'html_core')
1819
DB_PATH = os.path.join(BASE_DIR, 'data', 'man_pages_kv.db')
20+
HTML_FRAME_HEIGHT = 420 if platform.system() == "Windows" else 370
1921

2022

2123
class ManPageBox(ctk.CTkFrame):
@@ -24,7 +26,7 @@ def __init__(self, master, main_window, **kwargs):
2426
self.main_window = main_window
2527
self.grid_rowconfigure(1, weight=1)
2628
self.grid_columnconfigure(0, weight=1)
27-
self.html_view = HtmlFrame(self, height=370)
29+
self.html_view = HtmlFrame(self, height=HTML_FRAME_HEIGHT)
2830
self.html_view.grid(row=1, column=0, columnspan=2, sticky="nsew")
2931
self.html_view.grid_propagate(0)
3032
self.capture_original_scroll_bar_style()

0 commit comments

Comments
 (0)