Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor frontend to use QML / QtQuick. #761

Merged
merged 1 commit into from
Jul 25, 2023

Conversation

christianparpart
Copy link
Member

@christianparpart christianparpart commented Jul 21, 2022

Motivation

  • More future-proof / forward compatible Qt API usage
  • Hopefully easier to create new UI elements using QML / QtQuick rather than QtWidgets.
  • Basinc new ideas on top of this PR, specifically: Tabs and later on split views.
  • Having a unified look'n'feel of UI elements. In fact, the scrollbar currently doesn't look nice on all systems, e.g. @whisperity seems to have the default style while I have the awesome style on 0.3.2. With moving the QML/QtQuick it seems possible to have the same look on all platforms and desktops.

This PR "simply" refactors the frontend and ports it from QtWidgets (QOpenGLWidget) to QML / QtQuick. I try not to add any new feature or anything but get it on feature parity.

Checklist

  • port to QQuickItem for the Widget
  • expose TerminalSession to QML
  • ensure functional scrollbar
  • ensure window title updates
  • use implicitWidth / implicitHeight rather than width / height to declare widget component size
  • system beep working
  • BUG: currently app termination is assert()ing
  • ensure blurred background is working
  • UI dialogs working, such as permission request
  • notifications-OSC working (Requires Qt 5.12 or higher)
  • IME working
  • [PLATFORM] ensure proper rendering on Wayland
  • [PLATFORM] Ensure it's running on Windows
  • scrollbar (move the current JS impl to C++ by introducing a ScrollBar.vertical property (similar to QtQuick's))
    • hide_in_alt_screen:
  • platforms (ox/windows/linux): ensure creating new windows in-process and out-of-process is working
    • Windows
    • Linux
  • resize
  • background image
    • background is loaded from the path
    • opacity of the background image
    • proper layer positions
  • opacity
  • clean up
    Closes Migrate frontend from Qt Widgets to Qt QML API #956.

@github-actions github-actions bot added frontend Contour Terminal Emulator (GUI frontend) VT: Backend Virtual Terminal Backend (libterminal API) VT: rasterizer Rendering of the terminal into a pixmap using `terminal_renderer` library labels Jul 21, 2022
@christianparpart christianparpart changed the title WIP: [contour] Refactor display to make use of Qt/QML for more flexib… Refactor frontend to use QML / QtQuick. Jul 21, 2022
@christianparpart christianparpart added the frontend: OpenGL Contour OpenGL target label Jul 21, 2022
@christianparpart christianparpart marked this pull request as draft July 21, 2022 18:25
@christianparpart christianparpart force-pushed the improvement/qml-take-2 branch 4 times, most recently from b9c7efc to 9e5a91f Compare July 22, 2022 19:05
@uspasojevic96
Copy link
Member

Also add to TODO to not break the functionality on macOS where a single process can have multiple windows instead of spawning entirely new process

@christianparpart christianparpart force-pushed the improvement/qml-take-2 branch 8 times, most recently from a5f3902 to a446203 Compare July 29, 2022 20:47
@github-actions github-actions bot added the fonts font rasterization and text shaping API and platform implementations label Jul 29, 2022
@christianparpart christianparpart force-pushed the improvement/qml-take-2 branch 7 times, most recently from 0acd270 to 10e4939 Compare August 4, 2022 15:46
@github-actions github-actions bot added CI GitHub Actions & CI CMake documentation Improvements or additions to documentation labels Aug 4, 2022
@christianparpart christianparpart force-pushed the improvement/qml-take-2 branch 6 times, most recently from 933d546 to 99d9ecc Compare July 10, 2023 13:56
@github-actions github-actions bot added the VT: rasterizer Rendering of the terminal into a pixmap using `terminal_renderer` library label Jul 10, 2023
@Yaraslaut Yaraslaut force-pushed the improvement/qml-take-2 branch 3 times, most recently from a464b65 to a3cfde4 Compare July 12, 2023 07:33
@github-actions github-actions bot added the CMake label Jul 15, 2023
@Yaraslaut Yaraslaut force-pushed the improvement/qml-take-2 branch 2 times, most recently from db69ca6 to 32c5c76 Compare July 15, 2023 17:15
@christianparpart christianparpart force-pushed the improvement/qml-take-2 branch 2 times, most recently from fa64ab1 to acfa468 Compare July 20, 2023 06:55
@christianparpart christianparpart force-pushed the improvement/qml-take-2 branch 7 times, most recently from 1d810ba to fd8abf4 Compare July 25, 2023 19:06
Co-authored-by: Yaraslau <yaraslau.tamashevich@gmail.com>
Signed-off-by: Christian Parpart <christian@parpart.family>
@christianparpart christianparpart merged commit 528b44e into master Jul 25, 2023
51 of 65 checks passed
@christianparpart christianparpart deleted the improvement/qml-take-2 branch July 25, 2023 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI GitHub Actions & CI CMake frontend: OpenGL Contour OpenGL target frontend Contour Terminal Emulator (GUI frontend) VT: Backend Virtual Terminal Backend (libterminal API) VT: rasterizer Rendering of the terminal into a pixmap using `terminal_renderer` library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate frontend from Qt Widgets to Qt QML API Explore migration to QML
4 participants