Age | Commit message (Collapse) | Author | Files | Lines |
|
Replaced Platform::Clamp with Sci::clamp but will later change this to
std::clamp once on full C++17 compilers.
Drop MouseButtonBounce workaround for very early GTK+/Linux.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
where it may be needed in the future.
|
|
|
|
|
|
|
|
These are used to ensure popup windows are fully on-screen but after this
change, this doesn't always work on GTK+ 3.22 / Wayland.
|
|
setting the owning window by calling gtk_window_set_transient_for.
|
|
|
|
Either remove the parameter name if it is never used, or mark it with
G_GNUC_UNUSED when it might be used depending on some preprocessor
flags.
|
|
GTK 3.21.0 fixed font size handling, leading to properly interpreting
pixels and points in CSS declarations. However, as older versions
incorrectly handled those, the code has to handle both behaviours.
From CSS, GTK < 3.21.0 actually applied the conversion to points, but
incorrectly: 10px was used as 10pt, but 10pt was scaled up twice.
So, assuming 96 DPI, it leads to:
font-size | 3.20.0 | 3.21.0 |
----------|---------|---------|
10px | 13.33px | 10px |
10pt | 17.77px | 13.33px |
So, we need to fix the code to accommodate for both (either scaling
ourselves, or adapting the unit: I chose the second, simpler, option).
See https://git.gnome.org/browse/gtk+/commit/?id=df08fc91bdc1d2e4c866122304fabe4dd298a7de
|
|
matches g_iconv exactly. Make character set name buffer dynamically sized.
|
|
|
|
GTK 3.20 doesn't seem to like it so much when looking up details of a
non-exact current style context state, so use the current one.
This is GTK being really picky as in this case we are just missing the
`DIR_LTR` flag, which we definitely don't care about, but let's make it
happy.
|
|
GTK 3.20's GtkScrolledWinodw doesn't like having a too small allocation
and spews scary assertion failures. Fix that by requesting the real
size we'd like instead of hard-coding 1 as small-enough value in our
overriding height requisition method.
The actual value doesn't really matter so long as it's small enough
anyway, as we resize the popup to fit later on.
Note: this moves the actual implementation of ListBoxX::GetRowHeight()
to the new convenience function treeViewGetRowHeight(), with no changes
in implementation.
|
|
|
|
GTK 3.20 introduced a sub-node named "border" to the frame, requiring
to lookup the border on that sub-node rather than on the frame itself.
Unfortunately supporting this requires to be built against GTK 3.20, as
it requires API this version introduced. This means that a build
against an older version won't be able to get the popup sizing right if
running on 3.20. To mitigate this, add reasonable fallback defaults
when running 3.20 but built on an earlier version, to try and avoid
2px-scrolling on GTK 3.20's default theme.
|
|
|
|
Platform-independent caching is available and there is no performance difference
after removal.
|
|
|
|
|
|
Now the popup is cached the row height has to be re-computed when the
font changes on GTK2 too.
Closes [bugs:1774].
|
|
for passing integer values to callbacks, and avoiding casts by making functions
follow prototypes exactly.
|
|
|
|
versions of GTK+.
|
|
|
|
|
|
|
|
|
|
|
|
versions of GTK+.
|
|
|
|
GtkScrolledWindow in GTK 3.16 might have a minimum and natural height
of 0 if GTK_OVERLAY_SCROLLING is enabled (which is the default), so we
need to fix our overridden minimal height to never be greater than the
natural height.
Do that by only changing the minimal height if it is greater than what
we want.
I don't know why we didn't use to set 0 here, but it might be that a
height of 0 caused problems on older GTK versions, so keep 1 to be sure.
|
|
gdk_cursor_new_for_display.
|
|
GtkScrolledWindow contains a bitfield, and GCC 3.4 and 4.8 don't agree
on the size of the structure (regardless of -mms-bitfields):
- GCC 3.4 has sizeof(GtkScrolledWindow)=88
- GCC 4.8 has sizeof(GtkScrolledWindow)=84
As Windows GTK2 bundle is built with GCC 3, it requires types derived
from GtkScrolledWindow to be at least 88 bytes, which means we need to
add some fake padding to fill in the extra 4 bytes.
There is however no other issue with the layout difference as we never
access any GtkScrolledWindow fields ourselves.
See http://lists.geany.org/pipermail/devel/2015-April/thread.html#9379
|
|
default encoding instead of chosen encoding.
|
|
|
|
GTK 3.14 changed how the cell padding is calculated, and I can't seem
to understand the new logic yet. So, use the correct API for computing
the row size, which unfortunately doesn't work for us on GTK2, but
otherwise is a better way to go anyway.
Tested with GTK 3.2, 3.8, 3.10, 3.12 and 3.14.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Only cache the popup window itself and not its content, as it seems the
window sizing is affected whether the content was just created or not.
|