feat(emote-popup): save size of popup (#5415)

* fix: remove added margins from emote window position

* chore: add changelog entry

* feat: store size of emote window

* chore: update changelog entry

* fix: disable layout save

* fix: PCH moment

* fix: multiply by scale
This commit is contained in:
nerix
2024-06-01 12:38:39 +02:00
committed by GitHub
parent c3bb99eb01
commit 65bfec963b
12 changed files with 138 additions and 45 deletions
+9 -3
View File
@@ -219,9 +219,15 @@ WindowLayout WindowLayout::loadFromFile(const QString &path)
}
// Load emote popup position
QJsonObject emote_popup_obj = windowObj.value("emotePopup").toObject();
layout.emotePopupPos_ = QPoint(emote_popup_obj.value("x").toInt(),
emote_popup_obj.value("y").toInt());
{
auto emotePopup = windowObj["emotePopup"].toObject();
layout.emotePopupBounds_ = QRect{
emotePopup["x"].toInt(),
emotePopup["y"].toInt(),
emotePopup["width"].toInt(),
emotePopup["height"].toInt(),
};
}
layout.windows_.emplace_back(std::move(window));
}
+1 -1
View File
@@ -98,7 +98,7 @@ class WindowLayout
{
public:
// A complete window layout has a single emote popup position that is shared among all windows
QPoint emotePopupPos_;
QRect emotePopupBounds_;
std::vector<WindowDescriptor> windows_;