Skip to content

Commit

Permalink
maintain similar layout across OS
Browse files Browse the repository at this point in the history
  • Loading branch information
johnwangwyx committed Jun 3, 2024
1 parent 571f50b commit 56bb0eb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmdcompass/gui/manpagebox.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import customtkinter as ctk
from tkinterweb import HtmlFrame
import os
import platform
from cmdcompass.utils.utils import get_command_name, highlight_options, get_data_and_static_parent_dir
from cmdcompass.man_parser.loader import download_and_process_package
from cmdcompass.man_parser.html_coverter import OUTPUT_DIR
Expand All @@ -16,6 +17,7 @@
BASE_DIR = "."
HTML_CORE_DIR = os.path.join(BASE_DIR, 'data', 'man_pages', 'html_core')
DB_PATH = os.path.join(BASE_DIR, 'data', 'man_pages_kv.db')
HTML_FRAME_HEIGHT = 420 if platform.system() == "Windows" else 370


class ManPageBox(ctk.CTkFrame):
Expand All @@ -24,7 +26,7 @@ def __init__(self, master, main_window, **kwargs):
self.main_window = main_window
self.grid_rowconfigure(1, weight=1)
self.grid_columnconfigure(0, weight=1)
self.html_view = HtmlFrame(self, height=370)
self.html_view = HtmlFrame(self, height=HTML_FRAME_HEIGHT)
self.html_view.grid(row=1, column=0, columnspan=2, sticky="nsew")
self.html_view.grid_propagate(0)
self.capture_original_scroll_bar_style()
Expand Down

0 comments on commit 56bb0eb

Please sign in to comment.