mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
feat: boxed control center's content + extras
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user