Seth Hillbrand
89eeba3312
Correct WX check for DPI handler calls
3 years ago
Seth Hillbrand
9722a05820
Attempt to fix the Mac DPI grid mixing
When moving windows between monitors on Mac that changes the DPI, we
observe incorrect re-sizing of columns and rows. This attempts to
rectify the situation by avoiding DPI changes for Mac builds.
Fixes https://gitlab.com/kicad/code/kicad/issues/10586
4 years ago
jean-pierre charras
ac7cbcce61
WX_GRID: highlight the selected cell after selection by tab or arrow keys.
Fixes #9290
https://gitlab.com/kicad/code/kicad/issues/9290
4 years ago
jean-pierre charras
666f7ea38c
WX_GRID::EnsureColLabelsVisible(): avoid updating column label size when not needed.
Updating column label size generates a UI event and if EnsureColLabelsVisible()
is called inside a UI event, this is a bit annoying.
4 years ago
Jeff Young
a5247471f7
Expunge a bunch more fixed font specs from wxFormBuilder files.
Also removes the -1 sizing of the status bar on GTK and MSW.
Fixes https://gitlab.com/kicad/code/kicad/issues/8608
4 years ago
Jeff Young
9c78e4cf54
Mac needs different font size handling than MSW & GTK.
Mac already uses diverse font sizes (for instance, smaller fonts for
radio button groups), and the anti-aliasing is a lot better. The
other platforms need a more limited range of sizes.
Fixes https://gitlab.com/kicad/code/kicad/issues/8608
4 years ago
Jeff Young
fbee62fc15
Tie font size scaling to when automatic icon scaling fails.
It appears that SetSymbolicSize() and ConvertDialogToPixes() fail
under the same circumstances.
4 years ago
Jeff Young
ad59254be8
Another round of font sizing tweaks.
It appears that both strategies in the last commit worked, leaving us
with squared scaling. The dialog pixel architecture seems safer than
our icon scaling stuff, so this version attempts to use only it.
Also works around a bug where wxELLIPSIZE_MIDDLE doesn't work on Mac.
Fixes https://gitlab.com/kicad/code/kicad/issues/8608
Fixes https://gitlab.com/kicad/code/kicad/issues/8375
4 years ago
Jeff Young
7a822b55aa
Another round of changes to attempt to fix the GTK font size issue.
Fixes https://gitlab.com/kicad/code/kicad/issues/8608
4 years ago
Jeff Young
7a035e2675
More font scaling changes.
These may or may not fix scaling issues on GTK with HiDPI monitors.
4 years ago
Jeff Young
7033dd68c0
Default WX_GRID to no cell overflows.
Fixes https://gitlab.com/kicad/code/kicad/issues/8892
4 years ago
Wayne Stambaugh
bcd6bddfd4
Start expunging NULL.
Given that KiCad is a C++ project, we should really be using nullptr
instead of NULL.
4 years ago
Jon Evans
ad6256bdca
Fix linux/wx3.0 build
5 years ago
Marek Roszko
0e16db0c25
Kick wx.h mostly out of common
5 years ago
Wayne Stambaugh
08cf9a1e20
Move headers from common folders to appropriate include folders round 1.
5 years ago
Jeff Young
08dee31d9e
Try and unify the background colors between panels and platforms.
Also moves to WX_GRID to get rid of some wxGrid bugs, and moves the
provision of attrs to the GRID_TABLE (as those applied to the grid
are ignored when a table is specified).
Fixes https://gitlab.com/kicad/code/kicad/issues/5260
5 years ago
Simon Richter
632494cba7
Add missing includes
A few more instances of missing <algorithm> for std::max
6 years ago
Jeff Young
14788eec94
Performance improvement in wx_grid column label height calc.
Don't call GetColLabelValue() repeatedly. It's expensive as it doesn't
cache the string translations.
6 years ago
Ian McInerney
8d86d94a4d
wxWidgets compatibility fixes
* Remove unneeded check
* Fix WX_GRID since upstream renamed a variable in 3.1.3
6 years ago
jean-pierre charras
2dd653a327
WX_GRID: revert GetVisibleWidth() and add EnsureColLabelsVisible() to fix column label height of our wxGrid, for multiline column labels
7 years ago
jean-pierre charras
692fab2b73
WX_GRID::GetVisibleWidth(): fix column label height of our wxGrid, for multiline column labels
7 years ago
Jeff Young
076f07c683
Be more forgiving of large fonts in grids.
7 years ago
Seth Hillbrand
8b46c99c60
modedit: Fix footprint properties dialog
Checks for text in the dialog before setting width. Also prevents
resizing beyond the width of the window (in the case of large fonts)
7 years ago
jean-pierre charras
a703c53312
Fixes in dialogs: mainly better sizes for grid columns, but more other minor fixes.
Fix wxGrid column minimal widths on Windows in dialogs (just fixing the size is not enough).
WX_GRID::GetVisibleWidth(): make width bigger for labels, because they usually use a bold font.
(However, the fix is just a workaround: a better code is welcome)
7 years ago
jean-pierre charras
8dc4077d58
Fix compatibility issues with wxWidgets 3.1.1
7 years ago
Seth Hillbrand
8ff764376a
wx_grid: abstract visible column width
Cleanup code for checking visible extents of grid text. Places single
routine to extract the current spacing from the grid in WX_GRID.
7 years ago
Jeff Young
779ef044b7
Fix wxGrid column dragging bugs.
Close an open editor when dragging (as wxWidgets won't move it).
Make sure native column headers aren't in use where we need dragging:
their interaction with wxWidgets' dragging is buggy.
Fixes: lp:1796398
* https://bugs.launchpad.net/kicad/+bug/1796398
Fixes: lp:1796396
* https://bugs.launchpad.net/kicad/+bug/1796396
7 years ago
Maciej Suminski
f5de8cd3e1
Fix a possible out-of-bounds access in WX_GRID::SetTable()
7 years ago
Jeff Young
b90a261d5c
More safety fixes for uncommitted grid changes.
7 years ago
Jeff Young
8957008c2a
Adjust grid cols for large fonts and/or long translations.
Fixes: lp:1788495
* https://bugs.launchpad.net/kicad/+bug/1788495
7 years ago
Jeff Young
d72fdaed29
Rewrite Library Symbol Properties dialog.
Fix the user-model issues around aliases and alias selection.
Fold Library Symbol Fields into Library Symbol Properties.
Update to the new look.
Fixes: lp:1744773
* https://bugs.launchpad.net/kicad/+bug/1744773
Fixes: lp:1766205
* https://bugs.launchpad.net/kicad/+bug/1766205
Fixes: lp:1786339
* https://bugs.launchpad.net/kicad/+bug/1786339
7 years ago
Jeff Young
65d72e1c11
Fix compile errors on non-GCC compilers.
Fixes: lp:1782148
* https://bugs.launchpad.net/kicad/+bug/1782148
(cherry picked from commit 2ada8fa)
7 years ago
Jeff Young
aab97c8385
Consolidate design rules UI.
Implement new Board Setup paged dialog which includes:
Layers Setup
Design Rules
Solder Mask & Paste
Text & Drawings
Moves line width and text properties to a layer-class-based
system. Renames unlocked to upright (which also reverses the
logic).
New Edit Text and Graphic Properties dialog which replaces
Edit Footprint Text and adds layer-class-based editing and the
italic, upright and visibility properties.
Adds Import Settings functionality which allows settings to
be imported from another project at page granularity.
Also UNIT_BINDERizes the dialog and adds editing of pcb text.
Fixes: lp:1731952
* https://bugs.launchpad.net/kicad/+bug/1731952
Fixes: lp:1743464
* https://bugs.launchpad.net/kicad/+bug/1743464
Fixes: lp:1664761
* https://bugs.launchpad.net/kicad/+bug/1664761
Fixes: lp:1753362
* https://bugs.launchpad.net/kicad/+bug/1753362
Fixes: lp:1545427
* https://bugs.launchpad.net/kicad/+bug/1545427
Fixes: lp:1753775
* https://bugs.launchpad.net/kicad/+bug/1753775
Fixes: lp:1777692
* https://bugs.launchpad.net/kicad/+bug/1777692
Fixes: lp:1780670
* https://bugs.launchpad.net/kicad/+bug/1780670
Fixes: lp:1519601
* https://bugs.launchpad.net/kicad/+bug/1519601
(cherry picked from commit 3944a5e)
8 years ago
Jeff Young
3e062867de
Move all the grid workarounds into our own WX_GRID class.
(cherry picked from commit 08b4463)
8 years ago