From d0aba0242649b428de1caff99679fbf3d030f418 Mon Sep 17 00:00:00 2001 From: and3md Date: Tue, 31 Oct 2017 19:11:35 +0100 Subject: [PATCH] FileDialog: add FILE_DIALOG_GRID style to simplify change only FileDialog grid font. --- src/dlangui/dialogs/filedlg.d | 1 + src/dlangui/widgets/styles.d | 2 ++ views/res/theme_default.xml | 9 +++++++++ 3 files changed, 12 insertions(+) diff --git a/src/dlangui/dialogs/filedlg.d b/src/dlangui/dialogs/filedlg.d index a098cf01..a78815d1 100644 --- a/src/dlangui/dialogs/filedlg.d +++ b/src/dlangui/dialogs/filedlg.d @@ -771,6 +771,7 @@ class FileDialog : Dialog, CustomGridCellAdapter { } _fileList = new StringGridWidget("files"); + _fileList.styleId = STYLE_FILE_DIALOG_GRID; _fileList.layoutWidth(FILL_PARENT).layoutHeight(FILL_PARENT); _fileList.fullColumnOnLeft(false); _fileList.fullRowOnTop(false); diff --git a/src/dlangui/widgets/styles.d b/src/dlangui/widgets/styles.d index f1b7ca88..7f138631 100644 --- a/src/dlangui/widgets/styles.d +++ b/src/dlangui/widgets/styles.d @@ -115,6 +115,8 @@ immutable string STYLE_EDIT_BOX = "EDIT_BOX"; immutable string STYLE_LIST_BOX = "LIST_BOX"; /// standard style id for StringGrid immutable string STYLE_STRING_GRID = "STRING_GRID"; +/// standard style id for FileDialog StringGrid +immutable string STYLE_FILE_DIALOG_GRID = "FILE_DIALOG_GRID"; /// standard style id for background similar to transparent button immutable string STYLE_TRANSPARENT_BUTTON_BACKGROUND = "TRANSPARENT_BUTTON_BACKGROUND"; /// standard style id for GroupBox diff --git a/views/res/theme_default.xml b/views/res/theme_default.xml index 193bdfcf..c21050f4 100644 --- a/views/res/theme_default.xml +++ b/views/res/theme_default.xml @@ -343,6 +343,15 @@ layoutWidth="FILL_PARENT" layoutHeight="FILL_PARENT" /> +