[PR #250] [CLOSED] Add top center and bottom center widget alignment options #249

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/250
Author: @Copilot
Created: 2/22/2026
Status: Closed

Base: mainHead: copilot/add-top-center-bottom-center-alignment


📝 Commits (2)

  • fe88e03 Initial plan
  • f14d0b1 Add top center and bottom center widget alignment options

📊 Changes

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

View changed files

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

📄 Description

Widgets previously only supported 4-corner alignment (top left/right, bottom left/right). This adds topCenter and bottomCenter options that horizontally center the widget on the image while preserving vertical positioning from top/bottom edge.

  • SettingsAlignment enum (SettingsScene.swift): Added topCenter, bottomCenter cases with isCenter() helper. Updated isTop() to include topCenter.
  • Widget positioning (EffectUtils.swift): Center alignments compute x = (streamWidth - widgetWidth) / 2, bypassing the percentage-based horizontal offset.
  • Settings UI (WidgetSettingsView.swift): Horizontal position slider is hidden when center alignment is selected. Y slider mirror logic extended to include bottomCenter.

Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.


🔄 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/250 **Author:** [@Copilot](https://github.com/apps/copilot-swe-agent) **Created:** 2/22/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `copilot/add-top-center-bottom-center-alignment` --- ### 📝 Commits (2) - [`fe88e03`](https://github.com/eerimoq/moblin/commit/fe88e03b34fbccb6c6b8474746c7a85f0f1371d8) Initial plan - [`f14d0b1`](https://github.com/eerimoq/moblin/commit/f14d0b11778728fa6e613f1d808e2b3ffcf7b485) Add top center and bottom center widget alignment options ### 📊 Changes **3 files changed** (+28 additions, -13 deletions) <details> <summary>View changed files</summary> 📝 `Moblin/Various/Settings/SettingsScene.swift` (+11 -1) 📝 `Moblin/VideoEffects/EffectUtils.swift` (+3 -1) 📝 `Moblin/View/Settings/Scenes/Widgets/Widget/WidgetSettingsView.swift` (+14 -11) </details> ### 📄 Description Widgets previously only supported 4-corner alignment (top left/right, bottom left/right). This adds `topCenter` and `bottomCenter` options that horizontally center the widget on the image while preserving vertical positioning from top/bottom edge. - **`SettingsAlignment` enum** (`SettingsScene.swift`): Added `topCenter`, `bottomCenter` cases with `isCenter()` helper. Updated `isTop()` to include `topCenter`. - **Widget positioning** (`EffectUtils.swift`): Center alignments compute `x = (streamWidth - widgetWidth) / 2`, bypassing the percentage-based horizontal offset. - **Settings UI** (`WidgetSettingsView.swift`): Horizontal position slider is hidden when center alignment is selected. Y slider mirror logic extended to include `bottomCenter`. <!-- START COPILOT CODING AGENT TIPS --> --- ✨ Let Copilot coding agent [set things up for you](https://github.com/eerimoq/moblin/issues/new?title=✨+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot) — coding agent works faster and does higher quality work when set up for your repo. --- <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#249
No description provided.