[PR #253] [CLOSED] Add left center and right center widget alignment options #250

Closed
opened 2026-03-02 04:00:55 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/eerimoq/moblin/pull/253
Author: @Copilot
Created: 2/25/2026
Status: Closed

Base: mainHead: copilot/add-left-center-right-center-options


📝 Commits (2)

  • 889e8ca Initial plan
  • c2c5479 Add left center and right center widget alignment options

📊 Changes

3 files changed (+28 additions, -14 deletions)

View changed files

📝 Moblin/Various/Settings/SettingsScene.swift (+12 -2)
📝 Moblin/VideoEffects/EffectUtils.swift (+3 -1)
📝 Moblin/View/Settings/Scenes/Widgets/Widget/WidgetSettingsView.swift (+13 -11)

📄 Description

Widgets previously supported 6 alignment options (top/bottom × left/right/center). This adds two new options: left center and right center, which vertically center the widget on the image while allowing horizontal positioning from the respective edge.

  • Enum (SettingsScene.swift): Added leftCenter, rightCenter cases. Added isVerticalCenter() helper. Updated isLeft() and mirrorPositionHorizontally() to include the new cases.
  • Layout (EffectUtils.swift): move() now computes y = (streamHeight - widgetHeight) / 2 when isVerticalCenter(), before falling through to existing top/bottom logic.
  • UI (WidgetSettingsView.swift): Y position slider is hidden when isVerticalCenter(), matching how the X slider is already hidden for horizontally-centered alignments.

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/eerimoq/moblin/pull/253 **Author:** [@Copilot](https://github.com/apps/copilot-swe-agent) **Created:** 2/25/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `copilot/add-left-center-right-center-options` --- ### 📝 Commits (2) - [`889e8ca`](https://github.com/eerimoq/moblin/commit/889e8ca24f6491e984dd1aa7285cda01a45e1dc0) Initial plan - [`c2c5479`](https://github.com/eerimoq/moblin/commit/c2c5479ab97f4830a928d1aaa47fb4bbde1d109e) Add left center and right center widget alignment options ### 📊 Changes **3 files changed** (+28 additions, -14 deletions) <details> <summary>View changed files</summary> 📝 `Moblin/Various/Settings/SettingsScene.swift` (+12 -2) 📝 `Moblin/VideoEffects/EffectUtils.swift` (+3 -1) 📝 `Moblin/View/Settings/Scenes/Widgets/Widget/WidgetSettingsView.swift` (+13 -11) </details> ### 📄 Description Widgets previously supported 6 alignment options (top/bottom × left/right/center). This adds two new options: **left center** and **right center**, which vertically center the widget on the image while allowing horizontal positioning from the respective edge. - **Enum** (`SettingsScene.swift`): Added `leftCenter`, `rightCenter` cases. Added `isVerticalCenter()` helper. Updated `isLeft()` and `mirrorPositionHorizontally()` to include the new cases. - **Layout** (`EffectUtils.swift`): `move()` now computes `y = (streamHeight - widgetHeight) / 2` when `isVerticalCenter()`, before falling through to existing top/bottom logic. - **UI** (`WidgetSettingsView.swift`): Y position slider is hidden when `isVerticalCenter()`, matching how the X slider is already hidden for horizontally-centered alignments. <!-- START COPILOT CODING AGENT TIPS --> --- 💬 We'd love your input! Share your thoughts on Copilot coding agent in our [2 minute survey](https://gh.io/copilot-coding-agent-survey). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-02 04:00:55 +03:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/moblin#250
No description provided.