MySql: Support for multicolumn unique, CtrlLib: Fixed some menu color issues in Gnome

git-svn-id: svn://ultimatepp.org/upp/trunk@5296 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2012-08-28 18:33:14 +00:00
parent 940b76b531
commit 947ef307ee
5 changed files with 660 additions and 649 deletions

View file

@ -266,7 +266,7 @@ protected:
public:
struct Style : ChStyle<Style> {
Value item, topitem[3], topbar;
Color itemtext, topitemtext[3];
Color menutext, itemtext, topitemtext[3];
SeparatorCtrl::Style breaksep;
Value look, arealook;
Value popupframe, popupbody, popupiconbar;

View file

@ -574,6 +574,9 @@ void ChHostSkin()
sw = GtkInt("selected_shadow_type");
GtkCh(s.item, sw, GTK_STATE_PRELIGHT);
s.itemtext = ChGtkColor(2, menu_item);
s.menutext = SColorMenuText();
if(Diff(c, s.menutext) < 200) // menutext color too close to background color, fix it
s.menutext = IsDark(c) ? White() : Black();
ChGtkNew(top_item, "menuitem", GTK_BOX);
if(gtk_major_version > 2 || (gtk_major_version == 2 && gtk_minor_version >= 1))

View file

@ -27,7 +27,7 @@ CH_STYLE(MenuBar, Style, StyleDefault)
{
topitem[0] = Null;
topitem[1] = topitem[2] = item = SColorHighlight();
topitemtext[0] = SColorMenuText();
topitemtext[0] = menutext = SColorMenuText();
topitemtext[1] = topitemtext[2] = itemtext = SColorHighlightText();
topbar = SColorFace();
maxiconsize = Size(16, 16);

File diff suppressed because it is too large Load diff

View file

@ -50,6 +50,11 @@
#define UNIQUE ATTRIBUTE("alter table @t add unique UNQ_@x (@c);", \
"alter table @t drop index UNQ_@x;")
#define DUAL_UNIQUE(k1, k2) ATTRIBUTE("alter table @t add unique index DQ_@t$" #k1 #k2 " (" #k1 ", " #k2 ");",\
"alter table @t drop index DQ_@t$" #k1 #k2 ";")
#define UNIQUE_LIST(u, l) ATTRIBUTE("alter table @t add unique index UQ_@t$" #u " (" l ");",\
"alter table @t drop index UQ_@t$" #u ";")
#ifndef REFERENCES
#define REFERENCES(x) ATTRIBUTE("alter table @t add (constraint FK_@x foreign key "\
"(@c) references " #x ");",\
@ -101,8 +106,11 @@
#undef INDEX
#undef UNIQUE
#undef DUAL_UNIQUE
#undef UNIQUE_LIST
#undef REFERENCES
#undef TIMESTAMP
#undef COMMENT
#undef INNODB