MCPcopy Create free account
hub / github.com/YACReader/yacreader / applyLibraryReaderMode

Method applyLibraryReaderMode

YACReader/main_window_viewer.cpp:138–161  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

136}
137
138void MainWindowViewer::applyLibraryReaderMode(YACReader::FileType type)
139{
140 Configuration &config = Configuration::getConfiguration();
141 bool manga = false;
142 bool continuousScroll = config.getContinuousScroll();
143
144 switch (type) {
145 case YACReader::FileType::Manga:
146 manga = true;
147 break;
148 case YACReader::FileType::WebComic:
149 continuousScroll = true;
150 break;
151 case YACReader::FileType::Comic:
152 case YACReader::FileType::WesternManga:
153 case YACReader::FileType::Yonkoma:
154 default:
155 break;
156 }
157
158 viewer->setMangaWithoutStoringSetting(manga);
159 viewer->setContinuousScrollWithoutStoringSetting(continuousScroll);
160 syncModeActions(manga, continuousScroll);
161}
162
163void MainWindowViewer::syncModeActions(bool manga, bool continuousScroll)
164{

Callers

nothing calls this directly

Tested by

no test coverage detected