Skip to content

Enhanced Attachment Overlay#158

Open
GID0317 wants to merge 8 commits intoUnicordDev:redesignfrom
GID0317:Enhanced-Attachment-Overlay
Open

Enhanced Attachment Overlay#158
GID0317 wants to merge 8 commits intoUnicordDev:redesignfrom
GID0317:Enhanced-Attachment-Overlay

Conversation

@GID0317
Copy link
Contributor

@GID0317 GID0317 commented Dec 23, 2025

This PR enhances the attachment overlay (image viewer) zoom controls, date display, and action menu from latest discord interface. Features:

  • zoom controls with toggle mode, in/out buttons, and editable ComboBox (100%-1000%)
  • Gestures including double-tap zoom, pinch-to-zoom, and drag-to-pan
  • Sender metadata display showing avatar, name, and timestamp with user's format preference
  • Action menu flyout with Save as, Windows Share function, Open in browser, Copy images/link/ID
  • Success notification using InfoBar with auto-hide (3 seconds)
  • Rounded corners for attachment images in Sun Valley theme (8px)

Tested on: Windows 11 Version 25H2 (OS Build 26220.7523) x64

Preview:

  • zoom controls with toggle mode, in/out buttons, and editable ComboBox (100%-1000%)
image image
  • Action menu flyout
image
  • Rounded corners for attachment images in Sun Valley theme (8px)
image

Added avatar Ellipse with ImageBrush
Added sender name and timestamp TextBlocks
Added zoom ComboBox (100%-1000%)
Added layered zoom mode toggle button
Added zoom in/out buttons
Added "More" button with MenuFlyout
Added MenuFlyoutItems: Save as, Share, Open in browser, Copy images, Copy link, Copy attachment ID
Added MenuFlyoutSeparator
Added InfoBar for success notification
Added x:Uid attributes for all localizable elements
Added fields: _isZoomMode, _isPanning, _lastPointerPosition, _messageViewModel, _attachmentId, _currentAttachmentUri, _originalFileName
Added methods: EnterZoomMode(), ExitZoomMode(), EnsureZoomEnabled(), UpdateZoomButtonVisual(), UpdateSenderInfo(), UpdateZoomComboBox(), SetZoomLevel(), ShowSuccessBanner()
Added event handlers: ZoomModeButton_Click, attachmentImage_DoubleTapped, ZoomIn_Click, ZoomOut_Click, imageScrollViewer_PointerPressed/Moved/Released, ImageScrollViewer_ViewChanged, ZoomComboBox_SelectionChanged/TextSubmitted/LostFocus/KeyDown, SaveAs_Click, Share_Click, OnDataRequested, OpenInBrowser_Click, CopyImages_Click, CopyLink_Click, CopyAttachmentId_Click, ApplyZoomFromText()
Enhanced OnNavigatedTo to store attachment metadata and setup sender info
Added ResourceLoader for localized strings
Added reflection to access private DiscordAttachment fields
Added DataTransferManager integration for sharing
Changed ImageEmbed_CornerRadius from 2 to 8
Changed Attachment_CornerRadius from 4 to 8
- Added AttachmentOverlay_ZoomModeButton.[using:Windows.UI.Xaml.Controls]ToolTipService.ToolTip
- Added AttachmentOverlay_ZoomInButton.[using:Windows.UI.Xaml.Controls]ToolTipService.ToolTip
- Added AttachmentOverlay_ZoomOutButton.[using:Windows.UI.Xaml.Controls]ToolTipService.ToolTip
- Added AttachmentOverlay_MoreButton.[using:Windows.UI.Xaml.Controls]ToolTipService.ToolTip
- Added AttachmentOverlay_SaveAsMenuItem.Text
- Added AttachmentOverlay_ShareMenuItem.Text
- Added AttachmentOverlay_OpenInBrowserMenuItem.Text
- Added AttachmentOverlay_CopyImagesMenuItem.Text
- Added AttachmentOverlay_CopyLinkMenuItem.Text
- Added AttachmentOverlay_CopyAttachmentIdMenuItem.Text
- Added AttachmentOverlay_SaveSuccessMessage
@WamWooWam
Copy link
Collaborator

EYO THAT'S HOT, sorry I'm currently out of the country but I'll get on reviewing these as soon as I'm home, once again nice work :)

@GID0317
Copy link
Contributor Author

GID0317 commented Dec 25, 2025

EYO THAT'S HOT, sorry I'm currently out of the country but I'll get on reviewing these as soon as I'm home, once again nice work :)

Haha thanks! No worries at all, enjoy your time abroad and have a safe trip!

@GID0317
Copy link
Contributor Author

GID0317 commented Jan 23, 2026

i found some issue, so i will set it temporarily as draft for now

…d become too big

Added UseFullscreen property - Allows toggling between fullscreen mode and padded mode
Added validation - Check for width <= 0 || height <= 0 to prevent invalid sizes
This was following the discord approach. it was to prevent controls from becoming unreadable. Unigram follows a similar method. However, if we want the design to fully respect the theme, we should adopt the Photo app approach though this comes at the cost of reducing the available view area
@GID0317 GID0317 marked this pull request as ready for review January 23, 2026 15:53
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.

2 participants