From 3b8d44fb4646951be55b3777cbe30d3280867067 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 11 Jul 2012 15:51:11 +0000 Subject: - antiflicker effect for TTB resizing (thx to FYR for writing it) - TTB visual part extracted to the separate module git-svn-id: http://svn.miranda-ng.org/main/trunk@904 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/TopToolBar/ttbopt.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'plugins/TopToolBar/ttbopt.cpp') diff --git a/plugins/TopToolBar/ttbopt.cpp b/plugins/TopToolBar/ttbopt.cpp index 5fd2edef80..a63554f436 100644 --- a/plugins/TopToolBar/ttbopt.cpp +++ b/plugins/TopToolBar/ttbopt.cpp @@ -194,7 +194,8 @@ static INT_PTR CALLBACK ButOrderOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR SetDlgItemInt(hwndDlg, IDC_BUTTHEIGHT, g_ctrl->nButtonHeight, FALSE); SetDlgItemInt(hwndDlg, IDC_BUTTWIDTH, g_ctrl->nButtonWidth, FALSE); SetDlgItemInt(hwndDlg, IDC_BUTTGAP, g_ctrl->nButtonSpace, FALSE); - CheckDlgButton(hwndDlg, IDC_USEFLAT, DBGetContactSettingByte(0, TTB_OPTDIR, "UseFlatButton", 1)); + + CheckDlgButton(hwndDlg, IDC_USEFLAT, g_ctrl->bFlatButtons); BuildTree(hwndDlg); EnableWindow(GetDlgItem(hwndDlg, IDC_ENAME), FALSE); @@ -361,10 +362,12 @@ static INT_PTR CALLBACK ButOrderOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR g_ctrl->nButtonHeight = GetDlgItemInt(hwndDlg, IDC_BUTTHEIGHT, NULL, FALSE); g_ctrl->nButtonWidth = GetDlgItemInt(hwndDlg, IDC_BUTTWIDTH, NULL, FALSE); g_ctrl->nButtonSpace = GetDlgItemInt(hwndDlg, IDC_BUTTGAP, NULL, FALSE); - db_set_b(0, TTB_OPTDIR, "BUTTHEIGHT", g_ctrl->nButtonHeight); - db_set_b(0, TTB_OPTDIR, "BUTTWIDTH", g_ctrl->nButtonWidth); - db_set_b(0, TTB_OPTDIR, "BUTTGAP", g_ctrl->nButtonSpace); - db_set_b(0, TTB_OPTDIR, "UseFlatButton", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_USEFLAT)); + g_ctrl->bFlatButtons = (BYTE)IsDlgButtonChecked(hwndDlg, IDC_USEFLAT); + + db_set_dw(0, TTB_OPTDIR, "BUTTHEIGHT", g_ctrl->nButtonHeight); + db_set_dw(0, TTB_OPTDIR, "BUTTWIDTH", g_ctrl->nButtonWidth); + db_set_dw(0, TTB_OPTDIR, "BUTTGAP", g_ctrl->nButtonSpace); + db_set_b(0, TTB_OPTDIR, "UseFlatButton", g_ctrl->bFlatButtons); SaveTree(hwndDlg); RecreateWindows(); -- cgit v1.2.3