Commit Graph

132 Commits (0a9c44d1a2b3b5de76595dfc74938fca34b3448a)

Author SHA1 Message Date
Jonathan G Rennison 0a9c44d1a2 Merge branch 'master' into jgrpp
# Conflicts:
#	src/airport_gui.cpp
#	src/blitter/32bpp_anim_sse4.cpp
#	src/console_cmds.cpp
#	src/linkgraph/linkgraph_gui.cpp
#	src/newgrf_object.h
#	src/road_gui.cpp
#	src/widgets/road_widget.h
#	src/window.cpp
2 years ago
Peter Nelson ba94efba87 Change: Add flag to apply resize to largest resize step first.
Resize step is normally allocated equally amongst all resizable widgets.
With this flag, we allocate as much as possible from the largest
resize step first.
2 years ago
Peter Nelson b414060f7c Codechange: Make GetCurrentRect() conform to usual Rect bounds, and reuse it.
Similar code is already repeated in other locations.

(cherry picked from commit d8e06e590a)
3 years ago
Peter Nelson 065ae3964a Codechange: Don't update window contents if scrollbar position has not moved.
(cherry picked from commit 52b16237ad)
3 years ago
Peter Nelson d8e06e590a Codechange: Make GetCurrentRect() conform to usual Rect bounds, and reuse it.
Similar code is already repeated in other locations.
3 years ago
Peter Nelson 52b16237ad Codechange: Don't update window contents if scrollbar position has not moved. 3 years ago
Peter Nelson a469b4f395 Fix: Recalculate padding and minimum sizes when GUI or Font zoom is changed.
(cherry picked from commit 4791ff2862)
3 years ago
Peter Nelson 1a4a6f579e Cleanup: Call SetMinimalSize instead of setting min_y directly.
(cherry picked from commit 03a43b8247)
3 years ago
Peter Nelson dc6055bd82 Cleanup: Horizontal widget size is commonly width rather than length.
(cherry picked from commit 5153e1b6e3)
3 years ago
Peter Nelson 4791ff2862 Fix: Recalculate padding and minimum sizes when GUI or Font zoom is changed. 3 years ago
Peter Nelson 03a43b8247 Cleanup: Call SetMinimalSize instead of setting min_y directly. 3 years ago
Peter Nelson 5153e1b6e3 Cleanup: Horizontal widget size is commonly width rather than length. 3 years ago
Jonathan G Rennison 253772e9af Merge branch 'master' into jgrpp
# Conflicts:
#	CMakeLists.txt
#	COMPILING.md
#	src/console.cpp
#	src/console_cmds.cpp
#	src/console_internal.h
#	src/rev.cpp.in
3 years ago
Peter Nelson 51b4bd6c38 Codechange: Add widget text colour override property. 3 years ago
Peter Nelson 636e37d183 Codechange: Add internal widget alignment property, along with widget part. 3 years ago
Peter Nelson 2a0365b3d9 Cleanup: Remove unnecessary parameter of GetScrolledRowFromWidget()
Line height defaults to the resize height of the relevant widget, which is
set in all cases. Therefore it is not necessary to specify this value every time.

Additionally fixes scrolled padding for the framerate window.
3 years ago
Rubidium bf4fe19a66 Codechange: merge duplicated logic to scroll in lists by key into a single function 3 years ago
Jonathan G Rennison 227041008f Merge branch 'master' into jgrpp
# Conflicts:
#	src/debug.cpp
#	src/lang/russian.txt
#	src/misc_gui.cpp
#	src/os/windows/crashlog_win.cpp
#	src/os/windows/font_win32.cpp
#	src/os/windows/win32.cpp
#	src/rail_cmd.cpp
#	src/window_gui.h
3 years ago
Niels Martin Hansen 64c9af0991 Add: NWidgetBase::GetCurrentRect function 3 years ago
Jonathan G Rennison 5e14b54a0c Merge branch 'master' into jgrpp 3 years ago
Tyler Trahan de891238d6
Change: Recolour graph windows to brown (#8700) 3 years ago
Jonathan G Rennison b7ddd486cf Merge branch 'master' into jgrpp
# Conflicts:
#	cmake/CompileFlags.cmake
#	src/aircraft_cmd.cpp
#	src/blitter/32bpp_anim.cpp
#	src/cargopacket.cpp
#	src/cheat_gui.cpp
#	src/company_cmd.cpp
#	src/company_gui.cpp
#	src/core/pool_func.hpp
#	src/date.cpp
#	src/economy.cpp
#	src/error_gui.cpp
#	src/ground_vehicle.cpp
#	src/ground_vehicle.hpp
#	src/group_gui.cpp
#	src/industry_cmd.cpp
#	src/lang/dutch.txt
#	src/lang/french.txt
#	src/lang/german.txt
#	src/linkgraph/linkgraph_gui.cpp
#	src/linkgraph/mcf.cpp
#	src/network/network_content.cpp
#	src/network/network_server.cpp
#	src/network/network_udp.cpp
#	src/newgrf_engine.cpp
#	src/newgrf_station.cpp
#	src/order_cmd.cpp
#	src/order_gui.cpp
#	src/pathfinder/follow_track.hpp
#	src/pathfinder/yapf/yapf_common.hpp
#	src/saveload/saveload.cpp
#	src/settings_gui.cpp
#	src/station_cmd.cpp
#	src/station_kdtree.h
#	src/string_func.h
#	src/table/settings.ini
#	src/tgp.cpp
#	src/timetable_cmd.cpp
#	src/timetable_gui.cpp
#	src/toolbar_gui.cpp
#	src/town_cmd.cpp
#	src/train_cmd.cpp
#	src/train_gui.cpp
#	src/tree_gui.cpp
#	src/tunnelbridge_cmd.cpp
#	src/vehicle.cpp
#	src/vehicle_gui.cpp
#	src/video/sdl2_v.cpp
#	src/video/sdl_v.cpp
#	src/video/win32_v.cpp
#	src/viewport.cpp
#	src/viewport_sprite_sorter_sse4.cpp
#	src/window.cpp
3 years ago
Patric Stout af22a4f2cd Add: show in the tooltip of disabled toolbar buttons why they are disabled 3 years ago
Charles Pigott 9b800a96ed
Codechange: Remove min/max functions in favour of STL variants (#8502) 3 years ago
Jonathan G Rennison 8f442500ea Change how dirty screen, window and viewport areas are tracked for later redrawing
Track dirty viewport areas seperately form general screen redraws.
Maintain a dirty block grid per viewport, with a smaller block size.
Use even smaller block size in viewport map mode.

Use a rectangle array for general screen redraws instead of a block grid.

Add a dirty bit to windows and widgets, to simplify the common case
of repainting a whole window or widget, without catching
neighbouring windows or viewports.
4 years ago
Jonathan G Rennison 3517068e30 Clip widget draw calls which are outside _cur_dpi 4 years ago
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 5 years ago
JMcKiern 04f659e768 Fix: Some typos found using codespell 5 years ago
glx 1f418555a1 Fix #7742, 66dd7c3: widget position can be negative 5 years ago
Henry Wilson 7c8e7c6b6e Codechange: Use null pointer literal instead of the NULL macro 5 years ago
Henry Wilson af7d9020a1 Codechange: Use override specifer for overriding member declarations
This is a C++11 feature that allows the compiler to check that a virtual
member declaration overrides a base-class member with the same signature.

Also src/blitter/32bpp_anim_sse4.hpp +38 is no longer erroneously marked
as virtual despite being a template.
5 years ago
Charles Pigott f5b1115039 Doc: Lots and lots of doxymentation fixes 6 years ago
frosch 80dffae130 (svn r27900) -Change [FS#6568]: Remove the gap between windows when positioning them after opening.
-Fix: Make automatic window-positioning RTL-aware.
-Fix: Automatic window-positioning now uses GUI-scale/style dependent sizes/distances instead of fixed pixel values.
7 years ago
rubidium 0af26b8a37 (svn r26971) -Fix: widget_data was sometimes uint16 and sometimes uint32; make it always be uint32 10 years ago
frosch 12ddbb7cb1 (svn r25864) -Fix: Use the actual sprite dimensions for sizing the dropdown arrow of dropdown widgets. 11 years ago
frosch 59b7125563 (svn r25727) -Fix [FS#5686]: NWidgetMatrix used pip_pre and pip_post inconsistently and incorrectly, causing misalignment for RTL. (spotted by sbr) 11 years ago
frosch 43ec0bf0c1 (svn r25537) -Codechange: Optionally make WWT_MATRIX compute the number of rows and columns from the resize step size. 11 years ago
frosch 98fdd20f84 (svn r25531) -Codechange: Use separate function to set data of WWT_MATRIX widgets. 11 years ago
frosch 4e4e635916 (svn r25294) -Feature: Add another button to window title bars to resize the window to its default size. 11 years ago
planetmaker c24374f99c (svn r24900) -Fix [FS#5389]: Comments with typos (most fixes supplied by Eagle_rainbow) 12 years ago
peter1138 1ef4f7712d (svn r24853) -Fix: Extend widget data member to 32 bits so that sprite IDs >= 2^16 can be used. 12 years ago
frosch cfccaff645 (svn r24696) -Doc: Improve documentation for button widget types. 12 years ago
michi_cc 6a70abbd99 (svn r24136) -Feature [FS#4465]: Autoreplace vehicles only when they get old. (Vikthor) 12 years ago
truebrain 1c9bec1999 (svn r23640) -Fix: stop using FORCEINLINE (1/3rd of the instances were, the others were still regular inline), but make sure inline is always a 'forced' inline (I am looking at you MSVC) 13 years ago
truebrain 403cd3acdb (svn r23631) -Add: ScriptWindow, to manipulate windows on the client (GameScript only) 13 years ago
peter1138 50d1541270 (svn r23017) -Codechange: Add support for resized scrollbars. 13 years ago
rubidium d89095b3ec (svn r21843) -Codechange: move documentation towards the code to make it more likely to be updates [t-z]. 14 years ago
terkhen 679cd3c21b (svn r21803) -Cleanup: Remove unnecessary semicolons. 14 years ago
frosch da09ebc59a (svn r21763) -Codechange: Pass the distance to Scrollbar::UpdatePosition() in units of small or big steps. 14 years ago
rubidium b91ae2483e (svn r21448) -Add: generic widget for creating a scrollable (one direction) and resizable (both directions) area with same sized widgets 14 years ago