Skip to content

Conversation

@jw098
Copy link
Collaborator

@jw098 jw098 commented Jun 27, 2025

No description provided.

FileWindowLogger& m_logger;
QMenuBar* m_menubar;
QTextEdit* m_text;
bool m_pending_resize = false;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where does this get used? I see it set, but it's never read.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be honest, I just copy pasted it without understanding its purpose.
I now understand what it's for and I don't need it at this time.

…. Fix bug with re-opening the Output window.
@jw098
Copy link
Collaborator Author

jw098 commented Jun 27, 2025

After pushing the initial PR, I realized there were a few other features I wanted to implement.
Todo:
ensure INITIAL_X_POS can’t be too negative. Set minimum value based on window width/height.
Add event listener so that changing INITIAL_X_POS in the config will also change the window position.

uint32_t const screen_height = (uint32_t)screen_geometry.height();
uint32_t initial_x_pos_main = GlobalSettings::instance().WINDOW_SIZE->INITIAL_X_POS;
uint32_t initial_y_pos_main = GlobalSettings::instance().WINDOW_SIZE->INITIAL_Y_POS;
uint32_t move_x_main = std::min(initial_x_pos_main, screen_width-100);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens if this goes negative? screen_width-100 < 0

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assumed that PA would be run on screens bigger than 100 pixels. But fair enough, I'll change it to screen_width*0.97.

@jw098
Copy link
Collaborator Author

jw098 commented Jun 27, 2025

This PR should be done now.

@jw098 jw098 changed the title Default size, position for Output Window Save size, position for Main Window, Output Window on program start Jun 27, 2025
@Mysticial Mysticial merged commit b8dd7c7 into PokemonAutomation:main Jun 28, 2025
3 checks passed
@jw098 jw098 deleted the log-window branch June 29, 2025 06:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants