-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Linked Image Rendering & Image Viewer
- Renders linked images in post content. - Implements an image viewer dialog with download and copy URL functionality. - Improves spacing within post content and between content & scrollbars. - Adds download functionality for images, showing notifications on completion. Rich Text & Reference Handling - Parses post content as rich text, providing a more polished display. - Handles profile and note references, enabling navigation to relevant views. - Fixes referenced post display for both reposts and quote reposts. Video Support - Detects video URLs within post content and embeds a new PostVideo component. - Implements video playback controls (play/pause, progress bar, time display). - Adds a dedicated video viewer dialog with asynchronous download and copy URL options. - Fixes notification positioning for video downloads. - Introduces Qt Multimedia dependencies and relevant icons. Fullscreen Video Flow - Adds FullscreenVideoWindow for seamless fullscreen playback. - Creates a reusable NotificationToast component for consistent notifications. - Replaces ad-hoc fullscreen logic with the new VideoPlayer component to eliminate flicker. Scrolling & UI Improvements - Simplifies logic in ScrollingListView for smoother scrolling and user interaction. - Improves scrollbar interactivity with arrow buttons for easier navigation.
- Loading branch information
Showing
28 changed files
with
1,295 additions
and
134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
resources/qml/content/Components/FullscreenVideoWindow.ui.qml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
import QtQuick 2.15 | ||
import QtQuick.Controls 2.15 | ||
import QtQuick.Controls.Material 2.15 | ||
import QtQuick.Window 2.15 | ||
import QtMultimedia 5.15 | ||
|
||
import Components 1.0 | ||
|
||
Window { | ||
id: fullscreenVideoWindow | ||
visible: true | ||
width: Screen.width | ||
height: Screen.height | ||
visibility: Window.FullScreen | ||
color: "black" | ||
flags: Qt.Window | Qt.FramelessWindowHint | ||
|
||
property string videoUrl: "" | ||
|
||
NotificationToast { | ||
id: notification | ||
anchors.horizontalCenter: parent.horizontalCenter | ||
anchors.bottom: parent.bottom | ||
anchors.bottomMargin: 100 | ||
} | ||
|
||
VideoPlayer { | ||
id: fullscreenVideoPlayer | ||
anchors.fill: parent | ||
videoSource: fullscreenVideoWindow.videoUrl | ||
isFullscreen: true | ||
|
||
onShowNotification: function(message) { | ||
notification.show(message) | ||
} | ||
|
||
Component.onCompleted: { | ||
fullscreenVideoPlayer.play() | ||
} | ||
|
||
onFullScreenRequested: { | ||
fullscreenVideoPlayer.stop() | ||
fullscreenVideoWindow.close() | ||
} | ||
} | ||
|
||
Item { | ||
anchors.fill: parent | ||
focus: true | ||
Keys.onEscapePressed: { | ||
fullscreenVideoPlayer.stop() | ||
fullscreenVideoWindow.close() | ||
} | ||
} | ||
|
||
Component.onDestruction: { | ||
if (fullscreenVideoPlayer) { | ||
fullscreenVideoPlayer.stop() | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import QtQuick 2.15 | ||
import QtQuick.Controls 2.15 | ||
import QtQuick.Controls.Material 2.15 | ||
|
||
Rectangle { | ||
id: root | ||
width: notificationText.width + 40 | ||
height: 40 | ||
radius: 20 | ||
color: Material.accent | ||
opacity: 0 | ||
z: 999999 | ||
|
||
property alias text: notificationText.text | ||
|
||
Text { | ||
id: notificationText | ||
anchors.centerIn: parent | ||
text: "" | ||
color: "white" | ||
font.bold: true | ||
} | ||
|
||
Behavior on opacity { | ||
NumberAnimation { duration: 300 } | ||
} | ||
|
||
Timer { | ||
id: closeTimer | ||
interval: 3000 | ||
running: root.opacity > 0 | ||
onTriggered: root.opacity = 0 | ||
} | ||
|
||
function show(message) { | ||
text = message | ||
opacity = 1.0 | ||
} | ||
} |
Oops, something went wrong.