feat: boxed control center's content + extras

This commit is contained in:
Lemmy
2026-04-08 23:31:44 -04:00
parent 561a212298
commit 9b1e80b0ad
3 changed files with 6 additions and 4 deletions
+1 -1
View File
@@ -176,7 +176,7 @@ gdbus call --session --dest dev.noctalia.Debug --object-path /dev/noctalia/Debug
- [~] Control center panel (Weather, Media, Audio vol., )
- [ ] Keyboard layout switching
- [ ] PipeWire audio spectrum
- [~] Clipboard manager
- [~] Clipboard manager <- missing auto-paste /
- [~] Lock screen (ext-session-lock-v1) <- still needs polish
- [ ] Idle inhibitor (prevent sleep)
- [~] More compositors (Labwc pending)
@@ -71,7 +71,8 @@ void ControlCenterPanel::create() {
content->setPadding(Style::spaceLg * scale);
content->setRadius(Style::radiusXl * scale);
content->setBackground(palette.surfaceVariant);
content->setBorderWidth(0.0f);
content->setBorderWidth(Style::borderWidth);
content->setBorderColor(palette.outline);
content->setSoftness(1.0f);
content->setFlexGrow(4.0f);
m_content = content.get();
+3 -2
View File
@@ -44,7 +44,8 @@ void Glyph::measure(Renderer& renderer) {
// the glyph at the text baseline leaves its ink center above the label ink center.
// Instead, compute the Y that puts the glyph ink center at the reference center,
// matching where label ink sits regardless of per-glyph metrics.
const float refCenter = (refMetrics.bottom - refMetrics.top) * 0.5f;
const float refCenter = (refMetrics.bottom - refMetrics.top) * 0.5f;
const float glyphInkCenter = (metrics.top + metrics.bottom) * 0.5f; // relative to baseline
m_glyphNode->setPosition(0.0f, refCenter - glyphInkCenter);
const float glyphCenterX = (metrics.left + metrics.right) * 0.5f;
m_glyphNode->setPosition(std::round(width() * 0.5f - glyphCenterX), refCenter - glyphInkCenter);
}