LCL, dbgrids, fixes checkboxes not visible when using column's cbsCheckboxColumn style

git-svn-id: trunk@12247 -
This commit is contained in:
jesus 2007-09-29 18:48:34 +00:00
parent 1fdddb7bd2
commit 0752945e3d
6 changed files with 111 additions and 81 deletions

3
.gitattributes vendored
View File

@ -2498,6 +2498,9 @@ lcl/images/cursors/cur_18.cur -text svneol=unset#image/x-cursor
lcl/images/cursors/cur_20.cur -text svneol=unset#image/x-cursor
lcl/images/cursors/cur_21.cur -text svneol=unset#image/x-cursor
lcl/images/cursors/cur_22.cur -text svneol=unset#image/x-cursor
lcl/images/dbgridcheckedcb.xpm -text svneol=native#image/x-xpixmap
lcl/images/dbgridgrayedcb.xpm -text svneol=native#image/x-xpixmap
lcl/images/dbgriduncheckedcb.xpm -text svneol=native#image/x-xpixmap
lcl/images/dbnavcancel.xpm -text svneol=native#image/x-xpixmap
lcl/images/dbnavdelete.xpm -text svneol=native#image/x-xpixmap
lcl/images/dbnavedit.xpm -text svneol=native#image/x-xpixmap

View File

@ -554,81 +554,6 @@ type
property OnUserCheckboxBitmap;
end;
PCharArray = Array[0..6+13] of PChar;
const
IMGDBGrayedBox : PCharArray =
(
'13 13 6 1',
' c None',
'. c #808080',
'+ c #FFFFFF',
'@ c #404040',
'# c #D4D0C8',
'$ c #000000',
'############+',
'#..........#+',
'#.##########+',
'#.#######.##+',
'#.######..##+',
'#.#.###...##+',
'#.#..#...###+',
'#.#.....####+',
'#.##...#####+',
'#.###.######+',
'#.##########+',
'############+',
'+++++++++++++');
IMGDBCheckedBox : PCharArray =
(
'13 13 6 1',
' c None',
'. c #808080',
'+ c #FFFFFF',
'@ c #404040',
'# c #D4D0C8',
'$ c #000000',
'............+',
'.@@@@@@@@@@#+',
'.@+++++++++#+',
'.@+++++++$+#+',
'.@++++++$$+#+',
'.@+$+++$$$+#+',
'.@+$$+$$$++#+',
'.@+$$$$$+++#+',
'.@++$$$++++#+',
'.@+++$+++++#+',
'.@+++++++++#+',
'.###########+',
'+++++++++++++');
IMGDBUnCheckedBox : PCharArray =
(
'13 13 6 1',
' c None',
'. c #808080',
'+ c #FFFFFF',
'@ c #404040',
'# c #D4D0C8',
'$ c #000000',
'............+',
'.@@@@@@@@@@#+',
'.@+++++++++#+',
'.@+++++++++#+',
'.@+++++++++#+',
'.@+++++++++#+',
'.@+++++++++#+',
'.@+++++++++#+',
'.@+++++++++#+',
'.@+++++++++#+',
'.@+++++++++#+',
'.###########+',
'+++++++++++++');
procedure Register;
implementation
@ -2701,14 +2626,11 @@ begin
// Default bitmaps for cbsCheckedColumn
FUnCheckedBitmap := TBitmap.Create;
FUnCheckedBitmap.Handle := CreatePixmapIndirect(@IMGDBUnCheckedBox[0],
GetSysColor(COLOR_BTNFACE));
FUnCheckedBitmap.LoadFromLazarusResource('dbgriduncheckedcb');
FCheckedBitmap := TBitmap.Create;
FCheckedBitmap.Handle := CreatePixmapIndirect(@IMGDBCheckedBox[0],
GetSysColor(COLOR_BTNFACE));
FCheckedBitmap.LoadFromLazarusResource('dbgridcheckedcb');
FGrayedBitmap := TBitmap.Create;
FGrayedBitmap.Handle := CreatePixmapIndirect(@IMGDBGrayedBox[0],
GetSysColor(COLOR_BTNFACE));
FGrayedBitmap.LoadFromLazarusResource('dbgridgrayedcb');
end;
procedure TCustomDBGrid.InitiateAction;

View File

@ -0,0 +1,25 @@
/* XPM */
static char * dbgridcheckedcb[] = {
/* columns rows colors chars-per-pixel */
"13 13 6 1",
" c None",
". c #808080",
"+ c #FFFFFF",
"@ c #404040",
"# c #D4D0C8",
"$ c #000000",
/* pixels */
"............+",
".@@@@@@@@@@#+",
".@+++++++++#+",
".@+++++++$+#+",
".@++++++$$+#+",
".@+$+++$$$+#+",
".@+$$+$$$++#+",
".@+$$$$$+++#+",
".@++$$$++++#+",
".@+++$+++++#+",
".@+++++++++#+",
".###########+",
"+++++++++++++"
);

View File

@ -0,0 +1,25 @@
/* XPM */
static char * dbgridgrayedcb[] = {
/* columns rows colors chars-per-pixel */
"13 13 6 1",
" c None",
". c #808080",
"+ c #FFFFFF",
"@ c #404040",
"# c #D4D0C8",
"$ c #000000",
/* pixels */
"############+",
"#..........#+",
"#.##########+",
"#.#######.##+",
"#.######..##+",
"#.#.###...##+",
"#.#..#...###+",
"#.#.....####+",
"#.##...#####+",
"#.###.######+",
"#.##########+",
"############+",
"+++++++++++++"
};

View File

@ -0,0 +1,25 @@
/* XPM */
static char * dbgriduncheckedcb[] = {
/* columns rows colors chars-per-pixel */
"13 13 6 1",
" c none",
". c #808080",
"+ c #ffffff",
"@ c #404040",
"# c #d4d0c8",
"$ c #000000",
/* pixels */
"............+",
".@@@@@@@@@@#+",
".@+++++++++#+",
".@+++++++++#+",
".@+++++++++#+",
".@+++++++++#+",
".@+++++++++#+",
".@+++++++++#+",
".@+++++++++#+",
".@+++++++++#+",
".@+++++++++#+",
".###########+",
"+++++++++++++"
);

View File

@ -1,3 +1,33 @@
LazarusResources.Add('dbgridcheckedcb','XPM',[
'/* XPM */'#10'static char * dbgridcheckedcb[] = {'#10'/* columns rows colors'
+' chars-per-pixel */'#10'"13 13 6 1",'#10'" '#9'c None",'#10'".'#9'c #808080'
+'",'#10'"+'#9'c #FFFFFF",'#10'"@'#9'c #404040",'#10'"#'#9'c #D4D0C8",'#10'"$'
+#9'c #000000",'#10'/* pixels */'#10'"............+",'#10'".@@@@@@@@@@#+",'#10
+'".@+++++++++#+",'#10'".@+++++++$+#+",'#10'".@++++++$$+#+",'#10'".@+$+++$$$+'
+'#+",'#10'".@+$$+$$$++#+",'#10'".@+$$$$$+++#+",'#10'".@++$$$++++#+",'#10'".@'
+'+++$+++++#+",'#10'".@+++++++++#+",'#10'".###########+",'#10'"+++++++++++++"'
+#10');'#10
]);
LazarusResources.Add('dbgridgrayedcb','XPM',[
'/* XPM */'#10'static char * dbgridgrayedcb[] = {'#10'/* columns rows colors '
+'chars-per-pixel */'#10'"13 13 6 1",'#10'" '#9'c None",'#10'".'#9'c #808080"'
+','#10'"+'#9'c #FFFFFF",'#10'"@'#9'c #404040",'#10'"#'#9'c #D4D0C8",'#10'"$'
+#9'c #000000",'#10'/* pixels */'#10'"############+",'#10'"#..........#+",'#10
+'"#.##########+",'#10'"#.#######.##+",'#10'"#.######..##+",'#10'"#.#.###...#'
+'#+",'#10'"#.#..#...###+",'#10'"#.#.....####+",'#10'"#.##...#####+",'#10'"#.'
+'###.######+",'#10'"#.##########+",'#10'"############+",'#10'"+++++++++++++"'
+#10'};'#10
]);
LazarusResources.Add('dbgriduncheckedcb','XPM',[
'/* XPM */'#10'static char * dbgriduncheckedcb[] = {'#10'/* columns rows colo'
+'rs chars-per-pixel */'#10'"13 13 6 1",'#10'" '#9'c none",'#10'".'#9'c #8080'
+'80",'#10'"+'#9'c #ffffff",'#10'"@'#9'c #404040",'#10'"#'#9'c #d4d0c8",'#10
+'"$'#9'c #000000",'#10'/* pixels */'#10'"............+",'#10'".@@@@@@@@@@#+"'
+','#10'".@+++++++++#+",'#10'".@+++++++++#+",'#10'".@+++++++++#+",'#10'".@+++'
+'++++++#+",'#10'".@+++++++++#+",'#10'".@+++++++++#+",'#10'".@+++++++++#+",'
+#10'".@+++++++++#+",'#10'".@+++++++++#+",'#10'".###########+",'#10'"++++++++'
+'+++++"'#10');'#10
]);
LazarusResources.Add('dbnavcancel','XPM',[
'/* XPM */'#10'static char * dbnavcancel_xpm[] = {'#10'"20 20 78 1",'#10'" '#9
+'c None",'#10'".'#9'c #464646",'#10'"+'#9'c #434343",'#10'"@'#9'c #3F3F3F",'