Bug 399545 - "<textbox type="number"> spin buttons look wrong with some GTK themes" (add GTK theming for spinner and spinner-textfield) [p=twanno@lycos.nl (Teune van Steeg) r+sr=roc a1.9=beltzner]

This commit is contained in:
reed%reedloden.com 2007-12-21 11:30:29 +00:00
Родитель 39cbc87158
Коммит d46c702e9a
2 изменённых файлов: 8 добавлений и 2 удалений

Просмотреть файл

@ -123,6 +123,9 @@
// The down button of a spin control
#define NS_THEME_SPINNER_DOWN_BUTTON 74
// The textfield of a spin control
#define NS_THEME_SPINNER_TEXTFIELD 75
// A scrollbar.
#define NS_THEME_SCROLLBAR 80

Просмотреть файл

@ -191,8 +191,10 @@ nsNativeThemeGTK::GetGtkWidgetAndState(PRUint8 aWidgetType, nsIFrame* aFrame,
memset(aState, 0, sizeof(GtkWidgetState));
} else {
// for dropdown textfields, look at the parent frame (textbox or menulist)
if (aWidgetType == NS_THEME_DROPDOWN_TEXTFIELD)
// for dropdown and spinner textfields,
// look at the parent frame (textbox or menulist)
if (aWidgetType == NS_THEME_DROPDOWN_TEXTFIELD ||
aWidgetType == NS_THEME_SPINNER_TEXTFIELD)
aFrame = aFrame->GetParent();
// For XUL checkboxes and radio buttons, the state of the parent
@ -252,6 +254,7 @@ nsNativeThemeGTK::GetGtkWidgetAndState(PRUint8 aWidgetType, nsIFrame* aFrame,
if (aWidgetType == NS_THEME_TEXTFIELD ||
aWidgetType == NS_THEME_TEXTFIELD_MULTILINE ||
aWidgetType == NS_THEME_DROPDOWN_TEXTFIELD ||
aWidgetType == NS_THEME_SPINNER_TEXTFIELD ||
aWidgetType == NS_THEME_RADIO_CONTAINER ||
aWidgetType == NS_THEME_RADIO_LABEL) {
aState->focused = IsFocused(aFrame);