Browse Source

bug-fixes

master
Silberengel 2 weeks ago
parent
commit
8acd71a1cd
  1. 5
      src/imwald/app.py
  2. 10
      src/imwald/core/display_constants.py
  3. 12
      src/imwald/ui/feed_page.py

5
src/imwald/app.py

@ -10,7 +10,7 @@ from PySide6.QtWidgets import QApplication @@ -10,7 +10,7 @@ from PySide6.QtWidgets import QApplication
from imwald.config import db_path
from imwald.core.database import Database
from imwald.core.display_constants import APP_DISPLAY_NAME
from imwald.core.display_constants import APP_DISPLAY_NAME, APP_WM_ID
from imwald.core.nostr_engine import NostrEngine
from imwald.ui.asset_paths import favicon_png_path
from imwald.ui.main_window import MainWindow
@ -35,9 +35,10 @@ def _set_comfortable_default_font(app: QApplication) -> None: @@ -35,9 +35,10 @@ def _set_comfortable_default_font(app: QApplication) -> None:
def main() -> None:
logging.basicConfig(level=logging.INFO, format="%(levelname)s %(name)s: %(message)s")
app = QApplication(sys.argv)
app.setApplicationName("imwald")
app.setApplicationName(APP_WM_ID)
app.setApplicationDisplayName(APP_DISPLAY_NAME)
app.setOrganizationName("imwald")
app.setDesktopFileName(APP_WM_ID)
fav_pm = QPixmap(str(favicon_png_path()))
if not fav_pm.isNull():
app.setWindowIcon(QIcon(fav_pm))

10
src/imwald/core/display_constants.py

@ -2,4 +2,14 @@ @@ -2,4 +2,14 @@
APP_DISPLAY_NAME = "Imwald Desktop"
# Linux shell / compositor application identity (Wayland app_id, desktop entry basename,
# WM_CLASS-related naming). Jumble (Electron) uses ``imwald-jumble`` (see that repo’s
# ``electron/main.cjs`` + electron-builder linux config); keep this id different so desktops
# do not merge both clients into one dock / overview group.
APP_WM_ID = "imwald-desktop"
IMAGE_DISPLAY_MAX_WIDTH_PX = 400
# Extra space below primary feed content so bottom controls stay clear of OS dock
# hover previews / taskbar overlays (common on GNOME when the window reaches the screen edge).
WINDOW_CONTENT_BOTTOM_SAFE_INSET_PX = 28

12
src/imwald/ui/feed_page.py

@ -31,7 +31,10 @@ from imwald.core.author_html import ( @@ -31,7 +31,10 @@ from imwald.core.author_html import (
thread_reply_author_row_html,
)
from imwald.core.database import Database
from imwald.core.display_constants import IMAGE_DISPLAY_MAX_WIDTH_PX
from imwald.core.display_constants import (
IMAGE_DISPLAY_MAX_WIDTH_PX,
WINDOW_CONTENT_BOTTOM_SAFE_INSET_PX,
)
from imwald.core.kind0_profile import (
collect_nip05_identifiers,
kind0_json_object_prefix,
@ -346,7 +349,12 @@ class FeedPage(QWidget): @@ -346,7 +349,12 @@ class FeedPage(QWidget):
split.setSizes([780, 420])
outer = QVBoxLayout(self)
outer.setContentsMargins(10, 8, 10, 8)
outer.setContentsMargins(
10,
8,
10,
8 + WINDOW_CONTENT_BOTTOM_SAFE_INSET_PX,
)
outer.addWidget(split)
def _on_feed_rich_anchor(self, url: QUrl) -> None:

Loading…
Cancel
Save