diff options
| author | 2019-01-20 15:09:14 -0700 | |
|---|---|---|
| committer | 2019-01-20 15:09:14 -0700 | |
| commit | 63783db1b3ad50b8b7d4448ebb3195db7706742c (patch) | |
| tree | 6d93eeb0315eb1c7737c48fd0b9e90ee9c9c3364 /src | |
| parent | QT: Upgrade the Loading Bar to look much better (diff) | |
| download | yuzu-63783db1b3ad50b8b7d4448ebb3195db7706742c.tar.gz yuzu-63783db1b3ad50b8b7d4448ebb3195db7706742c.tar.xz yuzu-63783db1b3ad50b8b7d4448ebb3195db7706742c.zip | |
Hide progress bar on Prepare step
Diffstat (limited to 'src')
| -rw-r--r-- | src/yuzu/loading_screen.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/yuzu/loading_screen.cpp b/src/yuzu/loading_screen.cpp index 617b8c858..530f5173c 100644 --- a/src/yuzu/loading_screen.cpp +++ b/src/yuzu/loading_screen.cpp | |||
| @@ -46,12 +46,8 @@ LoadingScreen::LoadingScreen(QWidget* parent) | |||
| 46 | progressbar_style = { | 46 | progressbar_style = { |
| 47 | {VideoCore::LoadCallbackStage::Prepare, | 47 | {VideoCore::LoadCallbackStage::Prepare, |
| 48 | R"( | 48 | R"( |
| 49 | QProgressBar { | 49 | QProgressBar {} |
| 50 | background-color: black; | 50 | QProgressBar::chunk {})"}, |
| 51 | } | ||
| 52 | QProgressBar::chunk { | ||
| 53 | background-color: white; | ||
| 54 | })"}, | ||
| 55 | {VideoCore::LoadCallbackStage::Raw, | 51 | {VideoCore::LoadCallbackStage::Raw, |
| 56 | R"( | 52 | R"( |
| 57 | QProgressBar { | 53 | QProgressBar { |
| @@ -114,7 +110,7 @@ void LoadingScreen::Prepare(Loader::AppLoader& loader) { | |||
| 114 | ui->logo->setPixmap(map); | 110 | ui->logo->setPixmap(map); |
| 115 | } | 111 | } |
| 116 | 112 | ||
| 117 | OnLoadProgress(VideoCore::LoadCallbackStage::Prepare, 0, 100); | 113 | OnLoadProgress(VideoCore::LoadCallbackStage::Prepare, 0, 0); |
| 118 | } | 114 | } |
| 119 | 115 | ||
| 120 | void LoadingScreen::OnLoadProgress(VideoCore::LoadCallbackStage stage, std::size_t value, | 116 | void LoadingScreen::OnLoadProgress(VideoCore::LoadCallbackStage stage, std::size_t value, |
| @@ -124,6 +120,11 @@ void LoadingScreen::OnLoadProgress(VideoCore::LoadCallbackStage stage, std::size | |||
| 124 | // reset the timer if the stage changes | 120 | // reset the timer if the stage changes |
| 125 | if (stage != previous_stage) { | 121 | if (stage != previous_stage) { |
| 126 | ui->progress_bar->setStyleSheet(progressbar_style[stage]); | 122 | ui->progress_bar->setStyleSheet(progressbar_style[stage]); |
| 123 | if (stage == VideoCore::LoadCallbackStage::Prepare) { | ||
| 124 | ui->progress_bar->hide(); | ||
| 125 | } else { | ||
| 126 | ui->progress_bar->show(); | ||
| 127 | } | ||
| 127 | previous_stage = stage; | 128 | previous_stage = stage; |
| 128 | // reset back to fast shader compiling since the stage changed | 129 | // reset back to fast shader compiling since the stage changed |
| 129 | slow_shader_compile_start = false; | 130 | slow_shader_compile_start = false; |