Skip to content

Commit

Permalink
V2024.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
nlogozzo committed Aug 12, 2024
1 parent 4476c22 commit 01715b1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for details on how can you help the proje
## Screenshots

<details>
<summary>WinUI</summary>
<summary>QT</summary>

![Main](resources/screenshots/qt/main.png)
![Flip](resources/screenshots/qt/flip.png)
Expand Down
2 changes: 1 addition & 1 deletion libspotlight/src/controllers/mainwindowcontroller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ namespace Nickvision::Spotlight::Shared::Controllers
m_logger{ UserDirectories::get(ApplicationUserDirectory::LocalData, m_appInfo.getName()) / "log.txt", Logging::LogLevel::Info, false },
m_spotlightManager{ m_appInfo.getName(), m_logger }
{
m_appInfo.setVersion({ "2024.8.0-next" });
m_appInfo.setVersion({ "2024.8.0" });
m_appInfo.setShortName(_("Spotlight"));
m_appInfo.setDescription(_("Find your favorite Windows spotlight images"));
m_appInfo.setChangelog("- Redesigned the user interface with QT");
Expand Down
6 changes: 5 additions & 1 deletion org.nickvision.spotlight.qt/src/views/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -257,9 +257,13 @@ namespace Nickvision::Spotlight::QT::Views

void MainWindow::loadGridView()
{
m_ui->tblImages->clear();
int columnCount{ static_cast<int>(std::floor(m_ui->tblImages->width() / static_cast<double>(m_ui->tblImages->horizontalHeader()->defaultSectionSize()))) };
int rowCount{ static_cast<int>(std::ceil(m_controller->getSpotlightImages().size() / static_cast<double>(columnCount))) };
if(columnCount == m_ui->tblImages->columnCount())
{
return;
}
m_ui->tblImages->clear();
m_ui->tblImages->setColumnCount(columnCount);
m_ui->tblImages->setRowCount(rowCount);
for(int i = 0; i < rowCount; i++)
Expand Down

0 comments on commit 01715b1

Please sign in to comment.