Changeset 25807 in webkit
- Timestamp:
- Sep 29, 2007 8:30:20 AM (17 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r25806 r25807 1 2007-09-28 Jan Michael Alonzo <jmalonzo@unpluggable.com> 2 3 Reviewed by Mark. 4 5 -Fix http://bugs.webkit.org/show_bug.cgi?id=15254. 6 7 * platform/gtk/RenderThemeGtk.cpp: 8 (WebCore::RenderThemeGtk::determineState): 9 - Apply state if control is readonly 10 - Added state GTK_STATE_SELECTED of object is checked 11 - Apply GTK_STATE_ACTIVE if RenderObject isFocused() 12 (WebCore::RenderThemeGtk::paintTextField): 13 (WebCore::RenderThemeGtk::gtkEntry): 14 - Implemented theme-aware text field based on gtk/gtkentry.c implementation 15 1 16 2007-09-29 Holger Hans Peter Freyther <zecke@selfish.org> 2 17 -
trunk/WebCore/platform/gtk/RenderThemeGtk.cpp
r25754 r25807 128 128 GtkStateType RenderThemeGtk::determineState(RenderObject* o) 129 129 { 130 GtkStateType result = GTK_STATE_NORMAL; 131 if (!isEnabled(o)) 132 result = GTK_STATE_INSENSITIVE; 133 else if (isPressed(o)) 134 result = GTK_STATE_ACTIVE; 135 else if (isHovered(o)) 136 result = GTK_STATE_PRELIGHT; 137 return result; 130 if (!isEnabled(o) || isReadOnlyControl(o)) 131 return GTK_STATE_INSENSITIVE; 132 if (isPressed(o) || isFocused(o)) 133 return GTK_STATE_ACTIVE; 134 if (isHovered(o)) 135 return GTK_STATE_PRELIGHT; 136 if (isChecked(o)) 137 return GTK_STATE_SELECTED; 138 139 return GTK_STATE_NORMAL; 138 140 } 139 141 … … 240 242 } 241 243 242 bool RenderThemeGtk::paintTextField(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& r )244 bool RenderThemeGtk::paintTextField(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& rect) 243 245 { 244 246 // FIXME: should use theme-aware drawing 245 return true; 247 GtkWidget* entry = gtkEntry(); 248 IntPoint pos = i.context->translatePoint(rect.location()); 249 250 gtk_paint_shadow(entry->style, i.context->gdkDrawable(), 251 determineState(o), determineShadow(o), 252 0, entry, "entry", 253 pos.x(), pos.y(), rect.width(), rect.height()); 254 return false; 246 255 } 247 256 … … 291 300 292 301 return m_gtkRadioButton; 302 } 303 304 GtkWidget* RenderThemeGtk::gtkEntry() const 305 { 306 if (!m_gtkEntry) { 307 m_gtkEntry = gtk_entry_new(); 308 gtk_container_add(GTK_CONTAINER(gtkWindowContainer()), m_gtkEntry); 309 gtk_widget_realize(m_gtkEntry); 310 } 311 312 return m_gtkEntry; 293 313 } 294 314
Note: See TracChangeset
for help on using the changeset viewer.