Vadim Zeitlin
cd8b2d3096
Make wxWindow::GetContentScaleFactor() return 1 under MSW again
...
This reverts bc492a9e6e (Make wxWindow::GetContentScaleFactor() useful
for non-OSX platforms., 2015-03-18) and restores the old behaviour from
wxWidgets 3.0, which consisted in only returning factor different from 1
from this function for the platforms distinguishing logical and physical
pixels.
After this change, the return value of this function can be portably
used on all platforms to convert between logical and physical pixels,
independently of the current DPI.
2020-07-18 23:44:58 +02:00
Paul Cornett
948ddc6e0f
Eliminate -Wcast-qual warnings with GCC and Clang
...
Use const_cast, mutable, and various other changes to avoid -Wcast-qual
2020-02-02 22:50:32 -08:00
mehmets
9c291ffbbc
Optimize wrapping lines in wxRichTextCtrl
...
When wrapping long text into multiple lines, avoid unnecessary
GetFirstLineBreakPosition calls for each wrapped line, leading to
quadratic complexity.
Closes https://github.com/wxWidgets/wxWidgets/pull/1567
2019-10-08 01:38:31 +02:00
Paul Cornett
fe1737d399
Reduce the scope of some local variables
2019-04-05 10:44:02 -07:00
Paul Cornett
af1cf0a5f3
Use ctor-initializer rather than assignment for non-POD class members
2019-04-05 10:21:04 -07:00
Paul Cornett
90ce6a4334
Remove unused variables
2019-04-04 10:40:45 -07:00
Paul Cornett
e89cd4f2dd
Fix unintentional self-assignment
...
Assume what it was meant to be
2019-04-04 10:09:21 -07:00
Paul Cornett
ea5cf38d62
Fix unused variables
...
Infer from context how they were meant to be used
2019-04-04 09:59:01 -07:00
Graham Dawes
337879f222
Fix Copy leaving field unitialised
2019-01-10 16:54:11 +00:00
Maarten Bent
39ff5b90e5
Replace wxDeprecatedGUIConstants enum values
2018-11-25 21:29:32 +01:00
Vadim Zeitlin
c302a8d1e7
Use fractional point sizes in wxRichText code
...
When scaling, just use the floating point result directly instead of
rounding it.
2018-09-17 15:24:42 +02:00
Paul Cornett
98cd5a6b20
Use wxString::clear() instead of assignment to wxEmptyString
2018-05-11 10:52:56 -07:00
Paul Cornett
7d039a2e0b
Fix potential memory leak
...
See #15991
2018-05-11 10:47:21 -07:00
Jan Niklas Hasse
496da2e550
Remove trailing whitespace from several files
...
No real changes.
See https://github.com/wxWidgets/wxWidgets/pull/787
2018-04-18 15:45:42 +02:00
Paul Cornett
cd1c3fab0c
Use static linkage for various local names
2017-09-24 09:29:26 -07:00
Ilya Ivanov
ab7c39fddb
Check for variable being non-NULL before using it
...
The "buffer" argument can apparently be null, as there is a check for this on
the next line, but it was used without checking that this is the case.
Fix this, although it's not totally clear if "buffer" can really be null at
all and maybe the check below should have been removed instead -- but prefer
to err on the side of caution.
Thanks to PVS-Studio for finding this issue (V595 The 'buffer' pointer was
utilized before it was verified against nullptr).
2017-04-29 13:39:19 +02:00
JulianSmart
682d53fdaa
Use correct selection after editing cell properties
2016-10-17 12:42:00 +01:00
JulianSmart
c7d91d28a9
When collecting common attributes, reset attributes in target that are absent in source
2016-07-07 15:27:08 +01:00
JulianSmart
511923a974
Scaled bitmap and selection click fixes
2016-06-30 20:16:43 +01:00
Tobias Taschner
63803dd8d9
Fix MSVS 2015 warnings about hiding variables in wxRichText code
...
These warnings were apparently harmless, but really annoying, so get rid of
them by renaming the variables instead of reusing the same name in the nested
scope.
Closes #17351 .
2016-02-05 22:43:23 +01:00
JulianSmart
e27027a1dd
Selected images now differentiated in wxOSX/Cocoa
2015-12-15 12:37:06 +00:00
JulianSmart
76190de960
Only use scaled content factor for bitmaps on Mac
2015-11-15 18:54:10 +00:00
JulianSmart
a797c9d956
Make wxBitmap ctors consistent wrt passing scale for conversion from wxImage; HiDPI adaptation for propgrid buffer and wxRTC images
2015-11-15 12:49:25 +00:00
JulianSmart
ec2d9a2f89
Ensure paragraph properties are preserved when inserting a fragment in wxRTC
2015-11-14 18:50:30 +00:00
JulianSmart
6993b73042
Implement freeze/thaw in Do/Undo to considerably speed up commands with a large number of actions (commit omitted part)
2015-11-14 18:47:33 +00:00
JulianSmart
f2bc1f5e1d
Fixes for list style dialog and bullet drawing when no left subindent is specified
2015-11-14 18:37:12 +00:00
JulianSmart
5979facc48
Fixed bug in border drawing
2015-10-07 14:40:36 +01:00
JulianSmart
40430585d6
Removed erroneous variable declaration
2015-09-28 14:17:21 +01:00
Vadim Zeitlin
5a9ce576a2
No changes, just remove an unused variable.
...
Get rid of the g++ warning about it.
2015-05-24 02:00:34 +02:00
JulianSmart
4c772b4221
Fixed clipped borders on scaled-to-fit images, and fixed a floating image layout bug.
2015-05-23 15:33:54 +01:00
Dimitri Schoolwerth
8f8d58d193
Use wx-prefixed macros throughout the repository.
...
Change {DECLARE,IMPLEMENT}_*CLASS and {DECLARE,BEGIN,END}_EVENT_TABLE
occurrences to use the wx-prefixed version of the macros.
2015-04-23 22:00:35 +04:00
Vadim Zeitlin
3bec79d71c
Fix harmless warning about implicit double to char conversion.
...
Round the double value before passing it to wxColour::Set() instead of relying
on the implicit conversion which is dangerous and correctly flagged as such by
g++.
2015-03-01 02:05:28 +01:00
Julian Smart
0df45db7f6
Now uses the correct font and text effect when drawing bullet text.
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78522 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-02-18 17:37:12 +00:00
Julian Smart
8cf3e90650
Now allows space for a bullet even if no left subindent was specified; added a MeasureBullet function to support this.
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78518 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-02-18 12:18:27 +00:00
Vadim Zeitlin
5a8893aa7a
Fix harmless unused variable warning in some build configurations.
...
Don't declare the variables if they are not going to be used.
Closes #16830 .
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78436 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-02-04 13:16:26 +00:00
Paul Cornett
1b14371f07
use logical operator, rather than bitwise, on bools, closes #16824
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78432 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-02-02 17:23:55 +00:00
Julian Smart
4a5ae79a36
Remove selection before container is deleted or it could cause a crash later.
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78398 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-21 14:31:28 +00:00
Julian Smart
1d1f045f11
Bullet no longer gets the attributes from the first object in the list paragraph, so we can control it via paragraph attributes.
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78370 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-13 17:05:14 +00:00
Julian Smart
08f8f5311f
Added shadows to box attributes, and relevant controls in the Background page.
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78280 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-17 16:04:03 +00:00
Julian Smart
46d4a7d01c
Don't take right indent into account twice when aligning lines
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78102 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-07 17:32:07 +00:00
Julian Smart
cf72b6c111
Don't calculate refresh optimizations if we're not going to use them
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78025 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-16 10:13:48 +00:00
Julian Smart
8c56462500
Corrections to HasCharacterAttributes, HasParagraphAttributes
...
EditProperties functions don't try to change read-only content
Page up/down behaviour now takes into account margins and scale
Transparency and y poition corrections to field labels
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77981 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-08 10:29:01 +00:00
Julian Smart
4f4258cfdc
Implemented vertical image alignment.
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77722 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-18 14:39:49 +00:00
Julian Smart
7269fba894
Compensate for lack of bitmap inversion on Mac when selecting content.
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77489 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-28 08:31:51 +00:00
Vadim Zeitlin
33a92d117b
Suppress unused variable warning in wxRichTextObject code.
...
Put the variable used only inside #if 0'd code inside #if 0 itself
(it would be better to get rid of this entirely, of course...).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77474 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-24 15:32:07 +00:00
Julian Smart
6eec9dda58
Layout fix for paragraphs after floating objects not centering
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76897 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-13 08:44:22 +00:00
Vadim Zeitlin
d53f93f607
Fix wxRichTextCtrl code compilation with wxUSE_XML==0.
...
Add missing wxUSE_XML checks.
Closes #16251 .
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76490 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-10 16:15:46 +00:00
Julian Smart
1a16259223
Draw an unknown field using a fallback field type, so it's not invisible.
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76389 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-22 16:25:48 +00:00
Julian Smart
9b8b5b085d
Object position calculation correction
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76294 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-07 16:23:05 +00:00
Paul Cornett
87bb3c9c4f
fix some asserts that were clearly meant to be wxFAIL_MSG
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76272 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-04 15:09:15 +00:00