Closed Bug 233371 Opened 21 years ago Closed 6 years ago

Long tooltips should wrap instead of being cropped in gtkmozembed

Categories

(Core Graveyard :: Embedding: GTK Widget, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: piers, Assigned: asac)

References

Details

Attachments

(1 file, 2 obsolete files)

GtkMozEmbed version of bug 45375. Forwarded upstream from Epiphany from: http://bugzilla.gnome.org/show_bug.cgi?id=129456
Should this bug depend on 45375? At the very least, it might attract a little more attention to this bug, but I've know idea whether the actual FIX is dependant on bug 45375.
Could someone be persuaded to review the patch?
Christian, you have to request review to get this in. Does the patch still apply cleanly?
The title wording is incorrect - "wrapping" is not the solution. There are cases where the tooltip wraps but is still cropped over the edge of the screen.
Attached patch updated for trunk (obsolete) — Splinter Review
Attachment #219862 - Attachment is obsolete: true
Attachment #296135 - Flags: superreview?
Attachment #296135 - Flags: review?
Attachment #296135 - Flags: superreview?(timeless)
Attachment #296135 - Flags: superreview?
Attachment #296135 - Flags: review?(chpe)
Attachment #296135 - Flags: review?
seems to fix the problem for me.
Comment on attachment 296135 [details] [diff] [review] updated for trunk I can't review my own patch.
Attachment #296135 - Flags: review?(chpe)
the idea was to get feedback on whether i missed something while adapting this for trunk.
Attachment #296135 - Flags: superreview?(timeless) → review?(timeless)
Alexander, your patch diverged since bug 408823 landed
make the previous patch apply cleanly.
Attachment #296135 - Attachment is obsolete: true
Attachment #297343 - Flags: review?(benjamin)
Attachment #296135 - Flags: review?(timeless)
Assignee: blizzard → asac
QA Contact: pavlov → gtk-widget
Comment on attachment 297343 [details] [diff] [review] after bug 408823 landing I don't know enough GTK to review this effectively. Please try... marco, or maybe caillon would be willing.
Attachment #297343 - Flags: review?(benjamin)
This patch looks reasonable to me. I wonder if GTK+ 2.12's new tooltip API would be more amenable to being driven at a low level as gtkmozembed needs.
Comment on attachment 297343 [details] [diff] [review] after bug 408823 landing + // Ideally we'd query the cursor size and hotspot, + // but there appears to be no way to do that */ odd comment syntax // */ is there an upstream bug for this?
Attachment #297343 - Flags: review?(caillon)
Comment on attachment 297343 [details] [diff] [review] after bug 408823 landing >Index: embedding/browser/gtk/src/EmbedWindow.cpp >+ gint x, y; >+ gdk_window_get_origin(widget->window, &x, &y); >+ >+ x += aXCoords; >+ y += aYCoords; >+ >+ // Ideally we'd query the cursor size and hotspot, >+ // but there appears to be no way to do that */ >+ int xoffset = 8, yoffset = 8; You're using gints above so use them here, too. And fix the comment. >+ if (gtk_widget_get_direction(widget) == GTK_TEXT_DIR_RTL) { >+ x -= req.width + xoffset; >+ } else { >+ x += xoffset; >+ } > >- // and show it. >- gtk_widget_show_all(sTipWindow); >+ if (x + req.width > monitor.x + monitor.width) >+ x = monitor.x + monitor.width - req.width; >+ else if (x < monitor.x) >+ x = monitor.x; >+ >+ if (y + req.height + yoffset <= monitor.y + monitor.height) >+ y += yoffset; >+ else >+ y -= req.height + yoffset; Please use consistent bracing. r=caillon with those nits addressed.
Attachment #297343 - Flags: review?(caillon) → review+
Another dupe was reported in gnome bugzilla. Alexander?
Product: Core → Core Graveyard
Blocks: 1197603
No longer blocks: 1197603
Embedding: GTK Widget isn't a thing, closing.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: