diff --git a/src/dlangui/dialogs/filedlg.d b/src/dlangui/dialogs/filedlg.d index 9b1ba14e..b3c1edd7 100644 --- a/src/dlangui/dialogs/filedlg.d +++ b/src/dlangui/dialogs/filedlg.d @@ -227,6 +227,9 @@ class FileDialog : Dialog, CustomGridCellAdapter { _fileList.setCellText(2, i, toUTF32(sz)); _fileList.setCellText(3, i, toUTF32(date)); } + if(_fileList.height > 0) + _fileList.scrollTo(0, 0); + _fileList.autoFitColumnWidths(); _fileList.fillColumnWidth(1); if (selectionIndex >= 0) diff --git a/src/dlangui/graphics/fonts.d b/src/dlangui/graphics/fonts.d index f7a4e7f1..658e989f 100644 --- a/src/dlangui/graphics/fonts.d +++ b/src/dlangui/graphics/fonts.d @@ -855,11 +855,11 @@ struct GlyphCache // maxv is 65 for win32 fonts, 256 for freetype import std.math; //--------------------------------- -struct glyph_gamma_table(int maxv = 65) +class glyph_gamma_table(int maxv = 65) { this(double gammaValue = 1.0) { - gamma = gammaValue; + gamma(gammaValue); } @property double gamma() { return _gamma; } @property void gamma(double g) { @@ -890,6 +890,6 @@ private: __gshared glyph_gamma_table!65 _gamma65; __gshared glyph_gamma_table!256 _gamma256; __gshared static this() { - _gamma65 = glyph_gamma_table!65(1.0); - _gamma256 = glyph_gamma_table!256(1.0); + _gamma65 = new glyph_gamma_table!65(1.0); + _gamma256 = new glyph_gamma_table!256(1.0); }