Skip to content

Modernize UI with Chromium-inspired Frontend for enhanced UX#1475

Open
Prathvi321 wants to merge 1 commit intokiwix:mainfrom
Prathvi321:new-Chrome-like-frontend
Open

Modernize UI with Chromium-inspired Frontend for enhanced UX#1475
Prathvi321 wants to merge 1 commit intokiwix:mainfrom
Prathvi321:new-Chrome-like-frontend

Conversation

@Prathvi321
Copy link
Copy Markdown

This PR introduces a comprehensive overhaul of the Kiwix Desktop frontend. The primary goal of this redesign is to align the user interface with modern web browser standards (specifically the Chromium/Chrome layout). By leveraging a familiar design language, we reduce the learning curve for new users and provide a more intuitive navigation experience for offline content.

Key Improvements

  • Familiar Tab Management: Reimplemented the tab bar to mimic modern browser behavior, including "New Tab" functionality and improved drag-and-drop support.

  • Unified Address & Search Bar: Combined the navigation and search functions into a central "Omnibox" style header for quicker access to ZIM content.

  • Streamlined Sidebar: Relocated library management and bookmarks into a collapsible side panel, maximizing screen real estate for reading.

  • Modernized Iconography: Updated the UI assets to a cleaner, flat-design aesthetic consistent with current desktop environments.

Motivation
While the current Kiwix interface is functional, many users coming from standard web browsers find the specialized layout a point of friction. By adopting a "Chrome-like" interface:

  1. Onboarding is faster: Users already know where the back button, tabs, and settings are located.
  2. Productivity increases: The layout prioritizes the reading area while keeping navigation tools within a "muscle memory" distance.
  3. Visual Appeal: The application feels more like a modern 2026 desktop app rather than a legacy utility.

@kelson42
Copy link
Copy Markdown
Collaborator

@Prathvi321 Thank you very much for your PR. At this stage I have no judgement about your PR, but this will be hard to merge because:

  • For each of the point you bring, I have no issue and I'm therefore not even sure about a problem or the real nature of the problem
  • No screenshots before, after or detailed description about what has changed
  • One single commit with all the changes, so no way to isolate/understand clearly what has been done.

Would you be able to isolate the improvements you have done to the tabbar and bring it to a dedicated PR and clearly explains both problems and corresponding solution?

@kelson42 kelson42 requested review from Copilot and kelson42 April 25, 2026 14:11
@kelson42 kelson42 added this to the 2.6.0 milestone Apr 25, 2026
@kelson42 kelson42 force-pushed the new-Chrome-like-frontend branch from 802df62 to 1326906 Compare April 25, 2026 14:12
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR modernizes the Kiwix Desktop UI to better match a Chromium/Chrome-like layout and visual style.

Changes:

  • Repositions the TopWidget (“mainToolBar”) within the main window UI hierarchy.
  • Updates global colors and restyles the TopWidget/SearchBar to a more “Chromium” aesthetic.
  • Restyles tabs and tab controls (sizing, padding, hover/selected states) to match the new design language.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
ui/mainwindow.ui Moves mainToolBar into the central layout, changing its parent/placement semantics.
resources/css/style.css Updates palette and refines styling for TopWidget, SearchBar, and tab bar/buttons.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread ui/mainwindow.ui
Comment on lines +119 to +126
<widget class="TopWidget" name="mainToolBar">
<property name="movable">
<bool>false</bool>
</property>
<property name="floatable">
<bool>false</bool>
</property>
</widget>
Copy link

Copilot AI Apr 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TopWidget is a QToolBar that assumes its parent is the QMainWindow (e.g., TopWidget::mouseMoveEvent() calls parentWidget()->move(...) to drag the window, and when !SYSTEMTITLEBAR it connects the minimize/close actions to parent slots in src/topwidget.cpp). By placing mainToolBar inside centralWidget's layout, its parent becomes the central widget instead of the main window, which will break window-dragging and can make the minimize/close actions no-ops (missing slots). Keep it as a real main-window toolbar (restore the toolBarArea/toolBarBreak placement) or adjust TopWidget to act on window() / explicitly target MainWindow for those actions.

Copilot uses AI. Check for mistakes.
Comment thread resources/css/style.css
@@ -123,9 +123,9 @@ ZimItemWidget QRadioButton::indicator:checked {

TopWidget QToolButton:pressed,
TopWidget QToolButton::hover {
Copy link

Copilot AI Apr 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Qt stylesheet pseudo-states use a single colon (:hover). TopWidget QToolButton::hover is treated as a subcontrol selector and won’t match the hover state, so the intended hover styling for toolbar buttons won’t apply.

Suggested change
TopWidget QToolButton::hover {
TopWidget QToolButton:hover {

Copilot uses AI. Check for mistakes.
Comment thread resources/css/style.css
Comment on lines 34 to 41
SearchBar {
background-color: white;
background-color: #F1F3F4;
margin: 2px; /* XXX: duplicated in css_constants.h */
border: 1px solid #ccc; /* XXX: duplicated in css_constants.h */
border-radius: 3px;
border: none;
border-radius: 18px;

max-height: 40px;
max-height: 36px;
}
Copy link

Copilot AI Apr 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SearchBar now sets border: none, but src/css_constants.h still defines CSS::SearchBar::border = 1 and that value is used in geometry calculations (e.g., SearchBarLineEdit::getCompleterRect() in src/searchbar.cpp and SuggestionListDelegate positioning). This mismatch will shift/size the completer incorrectly; update the constant (and any dependent math) to reflect the new CSS border.

Copilot uses AI. Check for mistakes.
Comment thread resources/css/style.css
Comment on lines +227 to +230
border: none;
border-top-left-radius: 12px;
border-top-right-radius: 12px;
padding: 8px 16px;
Copy link

Copilot AI Apr 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QTabBar::tab styling changed significantly (padding is now 8px 16px and border: none), but src/css_constants.h still has CSS::QTabBar::tab::padding = 4 and border = 1, which is used by src/tabbar.cpp to compute the title drawing rect in paintEvent(). With the updated CSS this will make title positioning/clipping incorrect; keep the constants and the stylesheet in sync (or remove the dependency on hard-coded CSS mirrors).

Suggested change
border: none;
border-top-left-radius: 12px;
border-top-right-radius: 12px;
padding: 8px 16px;
border: 1px solid transparent;
border-top-left-radius: 12px;
border-top-right-radius: 12px;
padding: 4px;

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants