Fix for dropdown focus drawing

This commit is contained in:
pevanhoj@pevanhoj-laptop 2008-04-22 12:33:33 +03:00
Родитель d7b1f3aa7f
Коммит f1c77daea3
1 изменённых файлов: 11 добавлений и 9 удалений

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

@ -338,6 +338,7 @@ nsNativeThemeQt::GetWidgetPadding(nsIDeviceContext* ,
aResult->SizeTo(2, 2, 2, 2);
return PR_TRUE;
}
return PR_FALSE;
}
@ -396,13 +397,18 @@ nsNativeThemeQt::GetMinimumWidgetSize(nsIRenderingContext* aContext, nsIFrame* a
break;
}
case NS_THEME_SCROLLBAR_BUTTON_UP:
case NS_THEME_SCROLLBAR_BUTTON_DOWN:
case NS_THEME_SCROLLBAR_BUTTON_LEFT:
case NS_THEME_SCROLLBAR_BUTTON_RIGHT: {
case NS_THEME_SCROLLBAR_BUTTON_DOWN: {
(*aResult).width = s->pixelMetric(QStyle::PM_ScrollBarExtent);
(*aResult).height = (*aResult).width;
//*aIsOverridable = PR_FALSE;
break;
}
case NS_THEME_SCROLLBAR_BUTTON_LEFT:
case NS_THEME_SCROLLBAR_BUTTON_RIGHT: {
(*aResult).height = s->pixelMetric(QStyle::PM_ScrollBarExtent);
(*aResult).width = (*aResult).height;
//*aIsOverridable = PR_FALSE;
break;
}
case NS_THEME_SCROLLBAR_THUMB_VERTICAL: {
(*aResult).width = s->pixelMetric(QStyle::PM_ScrollBarExtent);
@ -462,7 +468,6 @@ nsNativeThemeQt::GetMinimumWidgetSize(nsIRenderingContext* aContext, nsIFrame* a
break;
}
case NS_THEME_DROPDOWN_TEXT: {
qDebug("---");
QStyleOptionComboBox comboOpt;
nsRect frameRect = aFrame->GetRect();
@ -653,8 +658,7 @@ void
nsNativeThemeQt::InitComboStyle(PRUint8 aWidgetType,
nsIFrame* aFrame,
QRect rect,
QStyleOptionComboBox &opt,
QStyle::State extraFlags /*= QStyle::State_None*/)
QStyleOptionComboBox &opt)
{
PRInt32 eventState = GetContentState(aFrame, aWidgetType);
@ -670,10 +674,8 @@ nsNativeThemeQt::InitComboStyle(PRUint8 aWidgetType,
opt.state |= QStyle::State_Raised;
if (!disabled && eventState & NS_EVENT_STATE_ACTIVE)
// Don't allow sunken when disabled
opt.state |= QStyle::State_On;
opt.state |= QStyle::State_Sunken;
opt.rect = rect;
opt.palette = mNoBackgroundPalette;
opt.state |= extraFlags;
}