Fix checkbox drawing

Draw frame backgrounds
pull/1/head
Timothy Pearson 12 years ago
parent 4a9ef2722b
commit c36c123364

@ -152,8 +152,12 @@ static TQStyle::SFlags gtkToTQtStyleFlags(GtkThemingEngine* engine, GtkStateFlag
}
}
if (mousedown) {
sflags |= TQStyle::Style_On;
if (!gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(checkButton))) {
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(checkButton))) {
sflags |= TQStyle::Style_On;
sflags |= TQStyle::Style_Down;
}
else {
sflags |= TQStyle::Style_Off;
sflags |= TQStyle::Style_Down;
}
}
@ -1684,6 +1688,7 @@ tdegtk_draw_common_background (DRAW_ARGS)
|| (gtk_widget_path_is_type(path, GTK_TYPE_VIEWPORT))
|| (gtk_widget_path_is_type(path, GTK_TYPE_SCROLLED_WINDOW))
|| (gtk_widget_path_is_type(path, GTK_TYPE_PANED))
|| (gtk_widget_path_is_type(path, GTK_TYPE_FRAME))
) {
TQStringList objectTypes;
objectTypes.append(TQWIDGET_OBJECT_NAME_STRING);

@ -978,18 +978,18 @@ void writeGtkThemeControlFile(int forceRecreate) {
ceData.widgetObjectTypes = objectTypes;
ceData.orientation = TQt::Horizontal;
TQSize sz;
TQMenuItem tqt3MenuItem;
tqt3MenuItem.setSeparator(false);
tdeStandardMenuItemHeight = TQPopupMenu::menuItemHeight(&tqt3MenuItem, tqApp->fontMetrics());
tqt3MenuItem.setSeparator(true);
tdeSeparatorMenuItemHeight = TQPopupMenu::menuItemHeight(&tqt3MenuItem, tqApp->fontMetrics());
TQSize sz;
ceData.rect = TQRect(0, 0, 0, tdeStandardMenuItemHeight);
sz = tqApp->style().sizeFromContents(TQStyle::CT_PopupMenuItem, ceData, elementFlags, TQSize(0, tdeStandardMenuItemHeight), TQStyleOption(&tqt3MenuItem));
sz = sz.expandedTo(TQSize(0, sz.height()));
tdeStandardMenuItemHeight = sz.height();
tqt3MenuItem.setSeparator(true);
tdeSeparatorMenuItemHeight = TQPopupMenu::menuItemHeight(&tqt3MenuItem, tqApp->fontMetrics());
ceData.rect = TQRect(0, 0, 0, tdeSeparatorMenuItemHeight);
sz = tqApp->style().sizeFromContents(TQStyle::CT_PopupMenuItem, ceData, elementFlags, TQSize(0, tdeSeparatorMenuItemHeight), TQStyleOption(&tqt3MenuItem));
sz = sz.expandedTo(TQSize(0, sz.height()));
@ -1009,7 +1009,7 @@ void writeGtkThemeControlFile(int forceRecreate) {
// stream << parse_rc_string("padding: " + TQString::number(tqApp->style().pixelMetric(TQStyle::PM_)), "GtkMenuBar");
stream << parse_rc_string("padding: " + TQString::number(tqApp->style().pixelMetric(TQStyle::PM_MenuBarFrameWidth)) + "px " + TQString::number(tqApp->style().pixelMetric(TQStyle::PM_MenuBarItemSpacing)*0.75) + "px", "GtkMenuBar>GtkMenuItem");
stream << parse_rc_string("padding: " + TQString::number((tdeStandardMenuItemHeight-tqApp->style().pixelMetric(TQStyle::PM_IndicatorHeight))/2) + "px " + TQString::number(0) + "px", "GtkMenu>GtkMenuItem");
stream << parse_rc_string("padding: " + TQString::number(((tdeStandardMenuItemHeight-tqApp->style().pixelMetric(TQStyle::PM_IndicatorHeight))/2)*0.75) + "px " + TQString::number(0) + "px", "GtkMenu>GtkMenuItem");
stream << parse_rc_string("padding: " + TQString::number(0) + "px " + TQString::number(0) + "px", "GtkMenu>GtkMenuSpacerItem");
// stream << parse_rc_string("padding: " + TQString::number(tqApp->style().pixelMetric(TQStyle::PM_)), "GtkMenu>GtkSeparatorMenuItem");

Loading…
Cancel
Save