mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-02 21:47:40 -05:00
impr: Dock newly opened windows by default
This commit is contained in:
@@ -434,8 +434,12 @@ namespace hex::plugin::builtin {
|
||||
|
||||
ContentRegistry::Interface::addMenuItemSubMenu({ "hex.builtin.menu.view" }, 1000, [] {
|
||||
for (auto &[name, view] : ContentRegistry::Views::impl::getEntries()) {
|
||||
if (view->hasViewMenuItemEntry())
|
||||
ImGui::MenuItem(LangEntry(view->getUnlocalizedName()), "", &view->getWindowOpenState());
|
||||
if (view->hasViewMenuItemEntry()) {
|
||||
auto &state = view->getWindowOpenState();
|
||||
|
||||
if (ImGui::MenuItem(LangEntry(view->getUnlocalizedName()), "", &state))
|
||||
view->setWindowJustOpened(state);
|
||||
}
|
||||
}
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace hex::plugin::builtin {
|
||||
}
|
||||
|
||||
void ViewThemeManager::drawContent() {
|
||||
if (ImGui::Begin(View::toWindowName("hex.builtin.view.theme_manager.name").c_str(), &this->m_viewOpen, ImGuiWindowFlags_NoCollapse)) {
|
||||
if (ImGui::Begin(View::toWindowName("hex.builtin.view.theme_manager.name").c_str(), &this->m_viewOpen, ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoDocking)) {
|
||||
ImGui::Header("hex.builtin.view.theme_manager.colors"_lang, true);
|
||||
|
||||
// Draw theme handlers
|
||||
|
||||
Reference in New Issue
Block a user