Julian Winkler
|
182c7cfb87
|
refactor View.native_measure()
It now respects gtk_widget_get_request_mode() when not specified
otherwise
|
2024-02-10 10:28:48 +01:00 |
|
Julian Winkler
|
eca365c60f
|
AndroidLayout: set minimum sizes correctly
This is needed for GtkScrolledWindow, which we still use for
implementing ScrollView
|
2024-02-10 10:28:48 +01:00 |
|
Mis012
|
b40a76fcfb
|
api-impl-jni: fix CheckJNI error for View.onClick
|
2024-01-29 00:37:32 +01:00 |
|
Julian Winkler
|
8c7dbf6ceb
|
start implementing Drawable using underlying GdkPaintable
|
2023-12-30 23:38:48 +01:00 |
|
Julian Winkler
|
1b03fa6e1a
|
merge View and ViewGroup constructor
Introduce empy JavaWidget to replace confusing usage of GtkBox and GtkDrawingArea.
gtk_widget_set_name() is called with the Java class name
|
2023-12-29 12:16:10 +01:00 |
|
Julian Winkler
|
757d689689
|
unify View construction and measurement
No longer allow constructing Views without Context.
Lets have only one onMeasure() method to unify behaviour
|
2023-12-29 11:40:52 +01:00 |
|
Julian Winkler
|
bff62a6e77
|
View: implement visibility and alpha properly
|
2023-11-12 12:16:23 +01:00 |
|
Julian Winkler
|
c0804c3329
|
WrapperWidget: overwrite measured size if layout size is fixed
|
2023-11-12 12:16:23 +01:00 |
|
Julian Winkler
|
36d7a1cc44
|
support layout margins
This makes the menu in Gravity Defied not get behind the keyboard.
Also makes the TabLayout in NewPipe not get behing the titlebar.
|
2023-11-12 12:16:23 +01:00 |
|
Julian Winkler
|
6ef1e523cc
|
View: relayout on visibility changes
|
2023-11-08 22:44:39 +01:00 |
|
Julian Winkler
|
ac5a547360
|
AndroidLayout: provide default width and height
setLayoutParams() will never be called on the contentView of the
Window. So make sure we have default values
|
2023-11-08 22:44:39 +01:00 |
|
Julian Winkler
|
585d934483
|
View: use gdk_event_get_modifier_state() for onTouch handling
previous implementation did not update num_clicks, when the
mouse was released outside the widget
|
2023-11-04 23:31:40 +01:00 |
|
Julian Winkler
|
29e88b08d8
|
AndroidLayout: ignore exceptions during measure
This fixes a crash with the Flower Finder test apk, where
ActionBarContextView doesn't allow MEASURE_SPEC_UNSPECIFIED
|
2023-11-04 08:49:58 +01:00 |
|
Julian Winkler
|
5813f9741d
|
AndroidLayout: implement get_request_mode
Also add stubs in Matrix and Paint class
|
2023-11-04 08:49:58 +01:00 |
|
Julian Winkler
|
385f6dcf0b
|
android_layout_measure: reuse old MeasureSpec for missing dimension
This should fix the SurfaceView in NewPipe not resizing automatically
|
2023-11-04 08:49:58 +01:00 |
|
Julian Winkler
|
0a8b8a3874
|
use AndroidLayout class also in View implementation
drop the onMeasure hack from WrapperWidget
|
2023-11-02 08:20:19 +01:00 |
|
Julian Winkler
|
3c03223085
|
android_layout_measure(): refactor to respect LayoutParams
This is needed when a Java widget gets measured from GTK
|
2023-11-02 08:20:13 +01:00 |
|
Julian Winkler
|
8b6de0e83a
|
move AndroidLayout class to own file
|
2023-11-01 17:55:02 +01:00 |
|
Julian Winkler
|
3de842b1d8
|
enable onTouchEvent for ViewGroups and add some stubs
|
2023-11-01 17:54:59 +01:00 |
|
Mis012
|
065fd96308
|
api-impl-jni: make invalidate() work inside the draw callback
this lets us remove the tick callback, and only call onDraw
when it's actually necessary
|
2023-10-31 23:14:52 +01:00 |
|
Mis012
|
bcd588446d
|
api-impl-jni/views/android_view_View.c: handle replacing existing onclick/ontouch listener
|
2023-10-31 16:00:35 +01:00 |
|
Mis012
|
0fc90e39c7
|
api-impl-jni/views/android_view_ViewGroup.c: set GTK_OVERFLOW_HIDDEN by default
|
2023-10-31 13:39:39 +01:00 |
|
Mis012
|
d483828236
|
android/view/View: naive implementation for setBackgroundColor
|
2023-10-30 17:28:38 +01:00 |
|
Julian Winkler
|
3bdffe7ce9
|
View: prevent redundant measuring for performance reasons
No need to remeasure or relayout when nothing has changed
|
2023-10-29 15:28:06 +01:00 |
|
Julian Winkler
|
3e7f07ec71
|
onTouchEvent: pass return value to GTK
This allows to propagate unhandled events to the next handler
|
2023-10-29 15:28:06 +01:00 |
|