зеркало из https://github.com/mozilla/pjs.git
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:
Родитель
39cbc87158
Коммит
d46c702e9a
|
@ -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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче