Skip to content

Commit

Permalink
Fix dock widgets
Browse files Browse the repository at this point in the history
  • Loading branch information
kaniol-lck committed Jul 4, 2024
1 parent de62997 commit 43c6a5b
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
5 changes: 2 additions & 3 deletions src/ui/browser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@

Browser::Browser(QWidget *parent) : QMainWindow(parent)
{
setDockNestingEnabled(true);
setDockOptions(QMainWindow::GroupedDragging);
}

void Browser::show()
void Browser::prepareShow()
{
setWindowTitle(name());
setWindowIcon(icon());
Expand All @@ -27,7 +27,6 @@ void Browser::show()
addDockWidget(Qt::RightDockWidgetArea, fileListDock);
}
load();
QMainWindow::show();
}

void Browser::load()
Expand Down
2 changes: 1 addition & 1 deletion src/ui/browser.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class Browser : public QMainWindow
explicit Browser(QWidget *parent = nullptr);
virtual ~Browser();

void show();
void prepareShow();

virtual void load();

Expand Down
1 change: 1 addition & 0 deletions src/ui/explorebrowser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ ExploreBrowser::ExploreBrowser(QWidget *parent, const QIcon &icon, const QString
});
openDialogAction_ = menu_->addAction(QIcon::fromTheme("window-new"), tr("Open in New Dialog"), this, [=]{
auto b = another();
b->prepareShow();
#ifdef Q_OS_WIN
if(Config().getUseFramelessWindow()){
auto frameless = new FramelessWrapper(b);
Expand Down
2 changes: 1 addition & 1 deletion src/ui/local/localmodbrowser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -953,7 +953,7 @@ void LocalModBrowser::on_actionOpen_In_GitHub_triggered()
qDebug() << list.at(1) << list.at(2);
GitHubRepoInfo repoInfo(list.at(1), list.at(2));
auto browser = new GitHubRepoBrowser(this, repoInfo);
browser->show();
browser->prepareShow();
}

void LocalModBrowser::on_actionExport_Compressed_File_triggered()
Expand Down
2 changes: 1 addition & 1 deletion src/ui/modmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ ModManager::ModManager(QWidget *parent) :

ui->pageSelectorDock->setWidget(browserSelector_);
for(auto &&widget : { ui->pageSelectorDock, ui->modInfoDock, ui->fileListDock })
ui->menu_View->insertAction(ui->menu_View->actions().first(), widget->toggleViewAction());
ui->menu_View->insertAction(ui->menu_View->actions().at(0), widget->toggleViewAction());

//Download
pageSwitcher_.addDownloadPage();
Expand Down

0 comments on commit 43c6a5b

Please sign in to comment.