Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Codechange: Increase scrollbar length limit to UINT_MAX and make their length properly unsigned #8006

Open
wants to merge 1 commit into
base: master
from

Conversation

@LordAro
Copy link
Member

@LordAro LordAro commented Feb 16, 2020

Also makes scrollbar internals properly use unsigned numbers. Bumped scrollbar limit to uint(32) as well, because why not

Fixes #7613

@stormcone
Copy link
Contributor

@stormcone stormcone commented Feb 16, 2020

There are 3 occurrences of this->group_sb->SetCount((uint)this->groups.size()); in group_gui.cpp, where I think the (uint) could be removed.

@LordAro LordAro force-pushed the LordAro:unlimited-scrollbars-but-within-reason branch from f37d429 to e3022c0 Feb 16, 2020
@LordAro
Copy link
Member Author

@LordAro LordAro commented Feb 16, 2020

good catch, seems I'd missed quite a few

@nielsmh nielsmh mentioned this pull request Feb 16, 2020
4 of 6 tasks complete
@LordAro LordAro force-pushed the LordAro:unlimited-scrollbars-but-within-reason branch 2 times, most recently from 462d4f2 to 77b52dc Feb 26, 2020
@LordAro LordAro changed the title Only store 1024 news messages Codechange: Increase scrollbar length limit to UINT_MAX and make their length properly unsigned Feb 26, 2020
src/newgrf_debug_gui.cpp Show resolved Hide resolved
src/newgrf_gui.cpp Outdated Show resolved Hide resolved
@LordAro LordAro force-pushed the LordAro:unlimited-scrollbars-but-within-reason branch from 77b52dc to 50e6c94 Jan 3, 2021
@TrueBrain TrueBrain added the preview label Jan 3, 2021
@DorpsGek DorpsGek temporarily deployed to preview-pr-8006 Jan 3, 2021 Inactive
@TrueBrain TrueBrain added this to the 1.11.0 milestone Jan 5, 2021
src/group_gui.cpp Outdated Show resolved Hide resolved
src/newgrf_debug_gui.cpp Outdated Show resolved Hide resolved
src/widget.cpp Show resolved Hide resolved
src/network/network_content_gui.cpp Outdated Show resolved Hide resolved
src/ai/ai_gui.cpp Outdated Show resolved Hide resolved
src/widget_type.h Outdated Show resolved Hide resolved
@LordAro LordAro force-pushed the LordAro:unlimited-scrollbars-but-within-reason branch from 50e6c94 to 9767467 Jan 10, 2021
@DorpsGek DorpsGek temporarily deployed to preview-pr-8006 Jan 10, 2021 Inactive
@LordAro LordAro force-pushed the LordAro:unlimited-scrollbars-but-within-reason branch from 9767467 to f8d0365 Jan 11, 2021
@DorpsGek DorpsGek temporarily deployed to preview-pr-8006 Jan 11, 2021 Inactive
src/company_gui.cpp Outdated Show resolved Hide resolved
src/core/math_func.hpp Outdated Show resolved Hide resolved
@LordAro LordAro force-pushed the LordAro:unlimited-scrollbars-but-within-reason branch from f8d0365 to 800b469 Jan 11, 2021
Copy link
Member

@TrueBrain TrueBrain left a comment

No longer crashes the game, tried a few windows, scrolling seems to work fine.

I am just there will be some window that doesn't work as we want or what-ever, but we will fix that when people report it :D

@LordAro
Copy link
Member Author

@LordAro LordAro commented Jan 12, 2021

Shouldn't be merged yet, lots of size_t -> uint warnings on Windows. Going to have to readd a load of casts :(

@TrueBrain TrueBrain dismissed their stale review Jan 12, 2021

.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

5 participants