Skip to content

Commit

Permalink
Bug fix 🐛
Browse files Browse the repository at this point in the history
- Fixed a bad reference
- Corrected the default width for preview expansion
  • Loading branch information
fairybow committed Feb 21, 2023
1 parent e69e9da commit 07a3e21
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions Fernanda/src/Splitter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,10 @@ void Splitter::expand(Info& widgetInfo)
widgetInfo.state = State::Expanded;
auto& handle_index = widgetInfo.handleIndex;
auto& stored_width = widgetInfo.width;
auto window_width = askWindowSize().width();
(widgetInfo.width < 1)
? moveSplitter(((handle_index < 2) ? (askWindowSize().width() * 0.2) : (askWindowSize().width() * 0.4)), handle_index)
: moveSplitter(((handle_index < 2) ? stored_width : (askWindowSize().width() - stored_width)), handle_index);
? moveSplitter(((handle_index < 2) ? (window_width * 0.2) : (window_width - (window_width * 0.4))), handle_index)
: moveSplitter(((handle_index < 2) ? stored_width : (window_width - stored_width)), handle_index);
}

void Splitter::uncollapseAll()
Expand Down Expand Up @@ -141,7 +142,7 @@ void Splitter::storeWidths()
for (auto& widget_info : widgets)
{
if (widget_info.state != State::Expanded) continue;
auto& size = sizes().at(widget_info.index);
auto size = sizes().at(widget_info.index);
if (widget_info.width && size)
widget_info.width = size;
}
Expand Down
4 changes: 2 additions & 2 deletions Fernanda/src/Version.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@

#pragma once

#define VER_FILEVERSION 0,24,2,51
#define VER_FILEVERSION_STR "v0.24.2-beta51"
#define VER_FILEVERSION 0,24,3,52
#define VER_FILEVERSION_STR "v0.24.3-beta52"
#define VER_PRODUCTVERSION VER_FILEVERSION
#define VER_PRODUCTVERSION_STR VER_FILEVERSION_STR
#define VER_COMPANYNAME_STR "@fairybow"
Expand Down

0 comments on commit 07a3e21

Please sign in to comment.