Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/gtk3.c
Original file line number Diff line number Diff line change
Expand Up @@ -1987,16 +1987,6 @@ JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1toolbar_1set_1icon_1size)
}
#endif

#ifndef NO_gtk_1toolbar_1set_1show_1arrow
JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1toolbar_1set_1show_1arrow)
(JNIEnv *env, jclass that, jlong arg0, jboolean arg1)
{
GTK3_NATIVE_ENTER(env, that, gtk_1toolbar_1set_1show_1arrow_FUNC);
gtk_toolbar_set_show_arrow((GtkToolbar *)arg0, (gboolean)arg1);
GTK3_NATIVE_EXIT(env, that, gtk_1toolbar_1set_1show_1arrow_FUNC);
}
#endif

#ifndef NO_gtk_1toolbar_1set_1style
JNIEXPORT void JNICALL GTK3_NATIVE(gtk_1toolbar_1set_1style)
(JNIEnv *env, jclass that, jlong arg0, jint arg1)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2000, 2025 IBM Corporation and others.
* Copyright (c) 2000, 2026 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
Expand Down Expand Up @@ -184,7 +184,6 @@ typedef enum {
gtk_1toolbar_1insert_FUNC,
gtk_1toolbar_1new_FUNC,
gtk_1toolbar_1set_1icon_1size_FUNC,
gtk_1toolbar_1set_1show_1arrow_FUNC,
gtk_1toolbar_1set_1style_FUNC,
gtk_1tree_1view_1column_1cell_1get_1size_FUNC,
gtk_1tree_1view_1get_1bin_1window_FUNC,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -702,11 +702,6 @@ public class GTK3 {
* @param item cast=(GtkToolItem *)
*/
public static final native void gtk_toolbar_insert(long toolbar, long item, int pos);
/**
* @param toolbar cast=(GtkToolbar *)
* @param show_arrow cast=(gboolean)
*/
public static final native void gtk_toolbar_set_show_arrow(long toolbar, boolean show_arrow);
/**
* @param toolbar cast=(GtkToolbar *)
* @param style cast=(GtkToolbarStyle)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,23 +177,7 @@ Point computeSizeInPixels (int wHint, int hHint, boolean changed) {
if (wHint != SWT.DEFAULT && wHint < 0) wHint = 0;
if (hHint != SWT.DEFAULT && hHint < 0) hHint = 0;

Point size = null;

if (GTK.GTK4) {
size = computeNativeSize (handle, wHint, hHint, changed);
} else {
/*
* Feature in GTK. Size of toolbar is calculated incorrectly
* and appears as just the overflow arrow, if the arrow is enabled
* to display. The fix is to disable it before the computation of
* size and enable it if WRAP style is set.
*/
GTK3.gtk_toolbar_set_show_arrow (handle, false);
size = computeNativeSize (handle, wHint, hHint, changed);
if ((style & SWT.WRAP) != 0) GTK3.gtk_toolbar_set_show_arrow (handle, true);
}

return size;
return computeNativeSize (handle, wHint, hHint, changed);
}

@Override
Expand Down Expand Up @@ -609,18 +593,8 @@ void reskinChildren (int flags) {

@Override
int setBounds (int x, int y, int width, int height, boolean move, boolean resize) {
if (!GTK.GTK4) GTK3.gtk_toolbar_set_show_arrow (handle, false);
int result = super.setBounds (x, y, width, height, move, resize);
if ((result & RESIZED) != 0) relayout ();
if ((style & SWT.WRAP) != 0) {
if (GTK.GTK4) {
/* TODO: GTK4 will require us to implement our own
* overflow menu. May require the use of the "toolbar" style class
* applied to the widget. */
} else {
GTK3.gtk_toolbar_set_show_arrow (handle, true);
}
}

return result;
}
Expand Down
Loading