mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-27 07:44:24 +02:00
Improve DarkMode toggling
Make choosing dark tone to not require turning back to light mode. Close #10141
This commit is contained in:
parent
fb91093ccb
commit
b3fdfdd064
@ -302,7 +302,7 @@ void SetDarkMode(bool useDark, bool fixDarkScrollbar)
|
|||||||
AllowDarkModeForApp(useDark);
|
AllowDarkModeForApp(useDark);
|
||||||
//_RefreshImmersiveColorPolicyState();
|
//_RefreshImmersiveColorPolicyState();
|
||||||
FlushMenuThemes();
|
FlushMenuThemes();
|
||||||
if (useDark && fixDarkScrollbar)
|
if (fixDarkScrollbar)
|
||||||
{
|
{
|
||||||
FixDarkScrollBar();
|
FixDarkScrollBar();
|
||||||
}
|
}
|
||||||
|
@ -217,7 +217,6 @@ namespace NppDarkMode
|
|||||||
Options opt;
|
Options opt;
|
||||||
opt.enable = nppGui._darkmode._isEnabled;
|
opt.enable = nppGui._darkmode._isEnabled;
|
||||||
opt.enableMenubar = opt.enable;
|
opt.enableMenubar = opt.enable;
|
||||||
opt.enableScrollbarHack = opt.enable;
|
|
||||||
|
|
||||||
g_colorToneChoice = nppGui._darkmode._colorTone;
|
g_colorToneChoice = nppGui._darkmode._colorTone;
|
||||||
|
|
||||||
@ -229,7 +228,7 @@ namespace NppDarkMode
|
|||||||
_options = configuredOptions();
|
_options = configuredOptions();
|
||||||
|
|
||||||
initExperimentalDarkMode();
|
initExperimentalDarkMode();
|
||||||
setDarkMode(_options.enable, _options.enableScrollbarHack);
|
setDarkMode(_options.enable, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// attempts to apply new options from NppParameters, sends NPPM_INTERNAL_REFRESHDARKMODE to hwnd's top level parent
|
// attempts to apply new options from NppParameters, sends NPPM_INTERNAL_REFRESHDARKMODE to hwnd's top level parent
|
||||||
@ -274,11 +273,6 @@ namespace NppDarkMode
|
|||||||
return _options.enableMenubar;
|
return _options.enableMenubar;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool isScrollbarHackEnabled()
|
|
||||||
{
|
|
||||||
return _options.enableScrollbarHack;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool isExperimentalActive()
|
bool isExperimentalActive()
|
||||||
{
|
{
|
||||||
return g_darkModeEnabled;
|
return g_darkModeEnabled;
|
||||||
@ -1267,8 +1261,9 @@ namespace NppDarkMode
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void redrawTreeViewScrollBar(HWND hwnd)
|
// force scrollbar redraw
|
||||||
|
void setTreeViewStyle(HWND hwnd)
|
||||||
{
|
{
|
||||||
SetWindowTheme(hwnd, nullptr, nullptr); //hack to redraw treeview scrollbar
|
SetWindowTheme(hwnd, nullptr, nullptr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,6 @@ namespace NppDarkMode
|
|||||||
{
|
{
|
||||||
bool enable = false;
|
bool enable = false;
|
||||||
bool enableMenubar = false;
|
bool enableMenubar = false;
|
||||||
bool enableScrollbarHack = false;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
enum class ToolTipsType
|
enum class ToolTipsType
|
||||||
@ -44,7 +43,6 @@ namespace NppDarkMode
|
|||||||
|
|
||||||
bool isEnabled();
|
bool isEnabled();
|
||||||
bool isDarkMenuEnabled();
|
bool isDarkMenuEnabled();
|
||||||
bool isScrollbarHackEnabled();
|
|
||||||
bool isExperimentalSupported();
|
bool isExperimentalSupported();
|
||||||
|
|
||||||
COLORREF invertLightness(COLORREF c);
|
COLORREF invertLightness(COLORREF c);
|
||||||
@ -104,5 +102,5 @@ namespace NppDarkMode
|
|||||||
void setDarkListView(HWND hwnd);
|
void setDarkListView(HWND hwnd);
|
||||||
|
|
||||||
void disableVisualStyle(HWND hwnd, bool doDisable);
|
void disableVisualStyle(HWND hwnd, bool doDisable);
|
||||||
void redrawTreeViewScrollBar(HWND hwnd);
|
void setTreeViewStyle(HWND hwnd);
|
||||||
}
|
}
|
||||||
|
@ -175,7 +175,7 @@ INT_PTR CALLBACK FileBrowser::run_dlgProc(UINT message, WPARAM wParam, LPARAM lP
|
|||||||
NppDarkMode::setDarkLineAbovePanelToolbar(_hToolbarMenu);
|
NppDarkMode::setDarkLineAbovePanelToolbar(_hToolbarMenu);
|
||||||
|
|
||||||
NppDarkMode::setDarkTooltips(_treeView.getHSelf(), NppDarkMode::ToolTipsType::treeview);
|
NppDarkMode::setDarkTooltips(_treeView.getHSelf(), NppDarkMode::ToolTipsType::treeview);
|
||||||
NppDarkMode::redrawTreeViewScrollBar(_treeView.getHSelf());
|
NppDarkMode::setTreeViewStyle(_treeView.getHSelf());
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -870,7 +870,7 @@ INT_PTR CALLBACK FunctionListPanel::run_dlgProc(UINT message, WPARAM wParam, LPA
|
|||||||
NppDarkMode::setDarkLineAbovePanelToolbar(_hToolbarMenu);
|
NppDarkMode::setDarkLineAbovePanelToolbar(_hToolbarMenu);
|
||||||
|
|
||||||
NppDarkMode::setDarkTooltips(_treeView.getHSelf(), NppDarkMode::ToolTipsType::treeview);
|
NppDarkMode::setDarkTooltips(_treeView.getHSelf(), NppDarkMode::ToolTipsType::treeview);
|
||||||
NppDarkMode::redrawTreeViewScrollBar(_treeView.getHSelf());
|
NppDarkMode::setTreeViewStyle(_treeView.getHSelf());
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -858,6 +858,7 @@ INT_PTR CALLBACK DarkModeSubDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM
|
|||||||
case WM_COMMAND:
|
case WM_COMMAND:
|
||||||
{
|
{
|
||||||
bool changed = false;
|
bool changed = false;
|
||||||
|
bool forceRefresh = false;
|
||||||
switch (wParam)
|
switch (wParam)
|
||||||
{
|
{
|
||||||
case IDC_CHECK_DARKMODE_ENABLE:
|
case IDC_CHECK_DARKMODE_ENABLE:
|
||||||
@ -885,6 +886,7 @@ INT_PTR CALLBACK DarkModeSubDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM
|
|||||||
// For tabbar: uncheck Alternate icons checkbox
|
// For tabbar: uncheck Alternate icons checkbox
|
||||||
::SendMessage(_hParent, PREF_MSG_DISABLETABBARALTERNATEICONS, 0, 0);
|
::SendMessage(_hParent, PREF_MSG_DISABLETABBARALTERNATEICONS, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
changed = true;
|
changed = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -939,20 +941,17 @@ INT_PTR CALLBACK DarkModeSubDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM
|
|||||||
nppGUI._darkmode._colorTone = NppDarkMode::oliveTone;
|
nppGUI._darkmode._colorTone = NppDarkMode::oliveTone;
|
||||||
}
|
}
|
||||||
|
|
||||||
// switch to light mode firstly (to make color change completely)
|
|
||||||
nppGUI._darkmode._isEnabled = false;
|
|
||||||
NppDarkMode::refreshDarkMode(_hSelf);
|
|
||||||
|
|
||||||
// switch to chosen dark mode
|
// switch to chosen dark mode
|
||||||
nppGUI._darkmode._isEnabled = true;
|
nppGUI._darkmode._isEnabled = true;
|
||||||
NppDarkMode::setDarkTone(nppGUI._darkmode._colorTone);
|
NppDarkMode::setDarkTone(nppGUI._darkmode._colorTone);
|
||||||
changed = true;
|
changed = true;
|
||||||
|
forceRefresh = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (changed)
|
if (changed)
|
||||||
{
|
{
|
||||||
NppDarkMode::refreshDarkMode(_hSelf);
|
NppDarkMode::refreshDarkMode(_hSelf, forceRefresh);
|
||||||
getFocus(); // to make black mode title bar appear
|
getFocus(); // to make black mode title bar appear
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
#define IDC_RADIO_SMALLICON (IDD_PREFERENCE_SUB_GENRAL + 3)
|
#define IDC_RADIO_SMALLICON (IDD_PREFERENCE_SUB_GENRAL + 3)
|
||||||
#define IDC_RADIO_BIGICON (IDD_PREFERENCE_SUB_GENRAL + 4)
|
#define IDC_RADIO_BIGICON (IDD_PREFERENCE_SUB_GENRAL + 4)
|
||||||
#define IDC_RADIO_STANDARD (IDD_PREFERENCE_SUB_GENRAL + 5)
|
#define IDC_RADIO_STANDARD (IDD_PREFERENCE_SUB_GENRAL + 5)
|
||||||
|
|
||||||
#define IDC_TABBAR_GB_STATIC (IDD_PREFERENCE_SUB_GENRAL + 6)
|
#define IDC_TABBAR_GB_STATIC (IDD_PREFERENCE_SUB_GENRAL + 6)
|
||||||
#define IDC_CHECK_REDUCE (IDD_PREFERENCE_SUB_GENRAL + 7)
|
#define IDC_CHECK_REDUCE (IDD_PREFERENCE_SUB_GENRAL + 7)
|
||||||
#define IDC_CHECK_LOCK (IDD_PREFERENCE_SUB_GENRAL + 8)
|
#define IDC_CHECK_LOCK (IDD_PREFERENCE_SUB_GENRAL + 8)
|
||||||
@ -79,20 +79,20 @@
|
|||||||
#define IDC_RADIO_ARROW (IDD_PREFERENCE_SUB_EDITING + 3)
|
#define IDC_RADIO_ARROW (IDD_PREFERENCE_SUB_EDITING + 3)
|
||||||
#define IDC_RADIO_CIRCLE (IDD_PREFERENCE_SUB_EDITING + 4)
|
#define IDC_RADIO_CIRCLE (IDD_PREFERENCE_SUB_EDITING + 4)
|
||||||
#define IDC_RADIO_BOX (IDD_PREFERENCE_SUB_EDITING + 5)
|
#define IDC_RADIO_BOX (IDD_PREFERENCE_SUB_EDITING + 5)
|
||||||
|
|
||||||
#define IDC_CHECK_LINENUMBERMARGE (IDD_PREFERENCE_SUB_EDITING + 6)
|
#define IDC_CHECK_LINENUMBERMARGE (IDD_PREFERENCE_SUB_EDITING + 6)
|
||||||
#define IDC_CHECK_BOOKMARKMARGE (IDD_PREFERENCE_SUB_EDITING + 7)
|
#define IDC_CHECK_BOOKMARKMARGE (IDD_PREFERENCE_SUB_EDITING + 7)
|
||||||
|
|
||||||
#define IDC_PADDING_STATIC (IDD_PREFERENCE_SUB_EDITING + 8)
|
#define IDC_PADDING_STATIC (IDD_PREFERENCE_SUB_EDITING + 8)
|
||||||
#define IDC_PADDINGLEFT_STATIC (IDD_PREFERENCE_SUB_EDITING + 9)
|
#define IDC_PADDINGLEFT_STATIC (IDD_PREFERENCE_SUB_EDITING + 9)
|
||||||
#define IDC_PADDINGRIGHT_STATIC (IDD_PREFERENCE_SUB_EDITING + 10)
|
#define IDC_PADDINGRIGHT_STATIC (IDD_PREFERENCE_SUB_EDITING + 10)
|
||||||
|
|
||||||
#define IDC_VES_GB_STATIC (IDD_PREFERENCE_SUB_EDITING + 11)
|
#define IDC_VES_GB_STATIC (IDD_PREFERENCE_SUB_EDITING + 11)
|
||||||
#define IDC_DISTRACTIONFREE_STATIC (IDD_PREFERENCE_SUB_EDITING + 12)
|
#define IDC_DISTRACTIONFREE_STATIC (IDD_PREFERENCE_SUB_EDITING + 12)
|
||||||
#define IDC_CHECK_EDGEBGMODE (IDD_PREFERENCE_SUB_EDITING + 13)
|
#define IDC_CHECK_EDGEBGMODE (IDD_PREFERENCE_SUB_EDITING + 13)
|
||||||
#define IDC_CHECK_CURRENTLINEHILITE (IDD_PREFERENCE_SUB_EDITING + 14)
|
#define IDC_CHECK_CURRENTLINEHILITE (IDD_PREFERENCE_SUB_EDITING + 14)
|
||||||
#define IDC_CHECK_SMOOTHFONT (IDD_PREFERENCE_SUB_EDITING + 15)
|
#define IDC_CHECK_SMOOTHFONT (IDD_PREFERENCE_SUB_EDITING + 15)
|
||||||
|
|
||||||
#define IDC_CARETSETTING_STATIC (IDD_PREFERENCE_SUB_EDITING + 16)
|
#define IDC_CARETSETTING_STATIC (IDD_PREFERENCE_SUB_EDITING + 16)
|
||||||
#define IDC_WIDTH_STATIC (IDD_PREFERENCE_SUB_EDITING + 17)
|
#define IDC_WIDTH_STATIC (IDD_PREFERENCE_SUB_EDITING + 17)
|
||||||
#define IDC_WIDTH_COMBO (IDD_PREFERENCE_SUB_EDITING + 18)
|
#define IDC_WIDTH_COMBO (IDD_PREFERENCE_SUB_EDITING + 18)
|
||||||
@ -103,9 +103,9 @@
|
|||||||
#define IDC_CHECK_DOCCHANGESTATEMARGE (IDD_PREFERENCE_SUB_EDITING + 23)
|
#define IDC_CHECK_DOCCHANGESTATEMARGE (IDD_PREFERENCE_SUB_EDITING + 23)
|
||||||
#define IDC_DISTRACTIONFREE_SLIDER (IDD_PREFERENCE_SUB_EDITING + 24)
|
#define IDC_DISTRACTIONFREE_SLIDER (IDD_PREFERENCE_SUB_EDITING + 24)
|
||||||
#define IDC_CHECK_MULTISELECTION (IDD_PREFERENCE_SUB_EDITING + 25)
|
#define IDC_CHECK_MULTISELECTION (IDD_PREFERENCE_SUB_EDITING + 25)
|
||||||
|
|
||||||
#define IDC_RADIO_FOLDMARGENONE (IDD_PREFERENCE_SUB_EDITING + 26)
|
#define IDC_RADIO_FOLDMARGENONE (IDD_PREFERENCE_SUB_EDITING + 26)
|
||||||
|
|
||||||
#define IDC_LW_GB_STATIC (IDD_PREFERENCE_SUB_EDITING + 27)
|
#define IDC_LW_GB_STATIC (IDD_PREFERENCE_SUB_EDITING + 27)
|
||||||
#define IDC_RADIO_LWDEF (IDD_PREFERENCE_SUB_EDITING + 28)
|
#define IDC_RADIO_LWDEF (IDD_PREFERENCE_SUB_EDITING + 28)
|
||||||
#define IDC_RADIO_LWALIGN (IDD_PREFERENCE_SUB_EDITING + 29)
|
#define IDC_RADIO_LWALIGN (IDD_PREFERENCE_SUB_EDITING + 29)
|
||||||
@ -117,7 +117,7 @@
|
|||||||
#define IDC_CHECK_DISABLEADVANCEDSCROLL (IDD_PREFERENCE_SUB_EDITING + 34)
|
#define IDC_CHECK_DISABLEADVANCEDSCROLL (IDD_PREFERENCE_SUB_EDITING + 34)
|
||||||
#define IDC_CHECK_NOEDGE (IDD_PREFERENCE_SUB_EDITING + 35)
|
#define IDC_CHECK_NOEDGE (IDD_PREFERENCE_SUB_EDITING + 35)
|
||||||
#define IDC_CHECK_SCROLLBEYONDLASTLINE (IDD_PREFERENCE_SUB_EDITING + 36)
|
#define IDC_CHECK_SCROLLBEYONDLASTLINE (IDD_PREFERENCE_SUB_EDITING + 36)
|
||||||
|
|
||||||
#define IDC_STATIC_MULTILNMODE_TIP (IDD_PREFERENCE_SUB_EDITING + 37)
|
#define IDC_STATIC_MULTILNMODE_TIP (IDD_PREFERENCE_SUB_EDITING + 37)
|
||||||
#define IDC_COLUMNPOS_EDIT (IDD_PREFERENCE_SUB_EDITING + 38)
|
#define IDC_COLUMNPOS_EDIT (IDD_PREFERENCE_SUB_EDITING + 38)
|
||||||
#define IDC_CHECK_RIGHTCLICKKEEPSSELECTION (IDD_PREFERENCE_SUB_EDITING + 39)
|
#define IDC_CHECK_RIGHTCLICKKEEPSSELECTION (IDD_PREFERENCE_SUB_EDITING + 39)
|
||||||
@ -126,7 +126,7 @@
|
|||||||
#define IDC_PADDINGLEFTVAL_STATIC (IDD_PREFERENCE_SUB_EDITING + 42)
|
#define IDC_PADDINGLEFTVAL_STATIC (IDD_PREFERENCE_SUB_EDITING + 42)
|
||||||
#define IDC_PADDINGRIGHTVAL_STATIC (IDD_PREFERENCE_SUB_EDITING + 43)
|
#define IDC_PADDINGRIGHTVAL_STATIC (IDD_PREFERENCE_SUB_EDITING + 43)
|
||||||
#define IDC_DISTRACTIONFREEVAL_STATIC (IDD_PREFERENCE_SUB_EDITING + 44)
|
#define IDC_DISTRACTIONFREEVAL_STATIC (IDD_PREFERENCE_SUB_EDITING + 44)
|
||||||
|
|
||||||
#define IDD_PREFERENCE_SUB_DELIMITER 6250 //(IDD_PREFERENCE_BOX + 250)
|
#define IDD_PREFERENCE_SUB_DELIMITER 6250 //(IDD_PREFERENCE_BOX + 250)
|
||||||
#define IDC_DELIMITERSETTINGS_GB_STATIC (IDD_PREFERENCE_SUB_DELIMITER + 1)
|
#define IDC_DELIMITERSETTINGS_GB_STATIC (IDD_PREFERENCE_SUB_DELIMITER + 1)
|
||||||
#define IDD_STATIC_OPENDELIMITER (IDD_PREFERENCE_SUB_DELIMITER + 2)
|
#define IDD_STATIC_OPENDELIMITER (IDD_PREFERENCE_SUB_DELIMITER + 2)
|
||||||
@ -147,7 +147,7 @@
|
|||||||
#define IDC_WITHCLOUD_RADIO (IDD_PREFERENCE_SUB_CLOUD_LINK + 7)
|
#define IDC_WITHCLOUD_RADIO (IDD_PREFERENCE_SUB_CLOUD_LINK + 7)
|
||||||
#define IDC_CLOUDPATH_EDIT (IDD_PREFERENCE_SUB_CLOUD_LINK + 8)
|
#define IDC_CLOUDPATH_EDIT (IDD_PREFERENCE_SUB_CLOUD_LINK + 8)
|
||||||
#define IDD_CLOUDPATH_BROWSE_BUTTON (IDD_PREFERENCE_SUB_CLOUD_LINK + 9)
|
#define IDD_CLOUDPATH_BROWSE_BUTTON (IDD_PREFERENCE_SUB_CLOUD_LINK + 9)
|
||||||
|
|
||||||
#define IDD_PREFERENCE_SUB_SEARCHENGINE 6270 //(IDD_PREFERENCE_BOX + 250)
|
#define IDD_PREFERENCE_SUB_SEARCHENGINE 6270 //(IDD_PREFERENCE_BOX + 250)
|
||||||
#define IDC_SEARCHENGINES_GB_STATIC (IDD_PREFERENCE_SUB_SEARCHENGINE + 1)
|
#define IDC_SEARCHENGINES_GB_STATIC (IDD_PREFERENCE_SUB_SEARCHENGINE + 1)
|
||||||
#define IDC_SEARCHENGINE_DUCKDUCKGO_RADIO (IDD_PREFERENCE_SUB_SEARCHENGINE + 2)
|
#define IDC_SEARCHENGINE_DUCKDUCKGO_RADIO (IDD_PREFERENCE_SUB_SEARCHENGINE + 2)
|
||||||
@ -204,7 +204,7 @@
|
|||||||
#define IDC_CHECK_SMARTHILITEUSEFINDSETTINGS (IDD_PREFERENCE_SUB_MISC + 39)
|
#define IDC_CHECK_SMARTHILITEUSEFINDSETTINGS (IDD_PREFERENCE_SUB_MISC + 39)
|
||||||
#define IDC_CHECK_SMARTHILITEANOTHERRVIEW (IDD_PREFERENCE_SUB_MISC + 40)
|
#define IDC_CHECK_SMARTHILITEANOTHERRVIEW (IDD_PREFERENCE_SUB_MISC + 40)
|
||||||
|
|
||||||
//-- xFileEditViewHistoryParameterGUI: Additional Checkbox for enabling the history for restoring the edit view per file.
|
//-- xFileEditViewHistoryParameterGUI: Additional Checkbox for enabling the history for restoring the edit view per file.
|
||||||
#define IDC_CHECK_REMEMBEREDITVIEWPERFILE (IDD_PREFERENCE_SUB_MISC + 41)
|
#define IDC_CHECK_REMEMBEREDITVIEWPERFILE (IDD_PREFERENCE_SUB_MISC + 41)
|
||||||
#define IDC_REMEMBEREDITVIEWPERFILE_STATIC (IDD_PREFERENCE_SUB_MISC + 42)
|
#define IDC_REMEMBEREDITVIEWPERFILE_STATIC (IDD_PREFERENCE_SUB_MISC + 42)
|
||||||
#define IDC_EDIT_REMEMBEREDITVIEWPERFILE (IDD_PREFERENCE_SUB_MISC + 43)
|
#define IDC_EDIT_REMEMBEREDITVIEWPERFILE (IDD_PREFERENCE_SUB_MISC + 43)
|
||||||
@ -253,10 +253,10 @@
|
|||||||
#define IDC_CUSTOMIZELENGTHVAL_STATIC (IDD_PREFERENCE_SUB_NEWDOCUMENT + 28)
|
#define IDC_CUSTOMIZELENGTHVAL_STATIC (IDD_PREFERENCE_SUB_NEWDOCUMENT + 28)
|
||||||
#define IDC_DISPLAY_STATIC (IDD_PREFERENCE_SUB_NEWDOCUMENT + 29)
|
#define IDC_DISPLAY_STATIC (IDD_PREFERENCE_SUB_NEWDOCUMENT + 29)
|
||||||
#define IDC_OPENSAVEDIR_CHECK_DRROPFOLDEROPENFILES (IDD_PREFERENCE_SUB_NEWDOCUMENT + 31)
|
#define IDC_OPENSAVEDIR_CHECK_DRROPFOLDEROPENFILES (IDD_PREFERENCE_SUB_NEWDOCUMENT + 31)
|
||||||
|
|
||||||
#define IDD_PREFERENCE_SUB_DEFAULTDIRECTORY 6450 //(IDD_PREFERENCE_BOX + 400)
|
#define IDD_PREFERENCE_SUB_DEFAULTDIRECTORY 6450 //(IDD_PREFERENCE_BOX + 400)
|
||||||
#define IDD_PREFERENCE_SUB_RECENTFILESHISTORY 6460 //(IDD_PREFERENCE_BOX + 400)
|
#define IDD_PREFERENCE_SUB_RECENTFILESHISTORY 6460 //(IDD_PREFERENCE_BOX + 400)
|
||||||
|
|
||||||
#define IDD_PREFERENCE_SUB_LANGUAGE 6500 //(IDD_PREFERENCE_BOX + 500)
|
#define IDD_PREFERENCE_SUB_LANGUAGE 6500 //(IDD_PREFERENCE_BOX + 500)
|
||||||
#define IDC_LIST_ENABLEDLANG (IDD_PREFERENCE_SUB_LANGUAGE + 1)
|
#define IDC_LIST_ENABLEDLANG (IDD_PREFERENCE_SUB_LANGUAGE + 1)
|
||||||
#define IDC_LIST_DISABLEDLANG (IDD_PREFERENCE_SUB_LANGUAGE + 2)
|
#define IDC_LIST_DISABLEDLANG (IDD_PREFERENCE_SUB_LANGUAGE + 2)
|
||||||
@ -288,7 +288,7 @@
|
|||||||
#define IDC_MT_STATIC (IDD_PREFERENCE_SUB_PRINT + 13)
|
#define IDC_MT_STATIC (IDD_PREFERENCE_SUB_PRINT + 13)
|
||||||
#define IDC_MR_STATIC (IDD_PREFERENCE_SUB_PRINT + 14)
|
#define IDC_MR_STATIC (IDD_PREFERENCE_SUB_PRINT + 14)
|
||||||
#define IDC_MB_STATIC (IDD_PREFERENCE_SUB_PRINT + 15)
|
#define IDC_MB_STATIC (IDD_PREFERENCE_SUB_PRINT + 15)
|
||||||
|
|
||||||
#define IDD_PREFERENCE_PRINT2_BOX 6700 //(IDD_PREFERENCE_BOX + 700)
|
#define IDD_PREFERENCE_PRINT2_BOX 6700 //(IDD_PREFERENCE_BOX + 700)
|
||||||
#define IDC_EDIT_HLEFT (IDD_PREFERENCE_PRINT2_BOX + 1)
|
#define IDC_EDIT_HLEFT (IDD_PREFERENCE_PRINT2_BOX + 1)
|
||||||
#define IDC_EDIT_HMIDDLE (IDD_PREFERENCE_PRINT2_BOX + 2)
|
#define IDC_EDIT_HMIDDLE (IDD_PREFERENCE_PRINT2_BOX + 2)
|
||||||
@ -319,7 +319,6 @@
|
|||||||
#define IDC_WHICHPART_STATIC (IDD_PREFERENCE_PRINT2_BOX + 27)
|
#define IDC_WHICHPART_STATIC (IDD_PREFERENCE_PRINT2_BOX + 27)
|
||||||
#define IDC_HEADERFPPTER_GR_STATIC (IDD_PREFERENCE_PRINT2_BOX + 28)
|
#define IDC_HEADERFPPTER_GR_STATIC (IDD_PREFERENCE_PRINT2_BOX + 28)
|
||||||
|
|
||||||
|
|
||||||
#define IDD_PREFERENCE_SUB_BACKUP 6800 //(IDD_PREFERENCE_BOX + 800)
|
#define IDD_PREFERENCE_SUB_BACKUP 6800 //(IDD_PREFERENCE_BOX + 800)
|
||||||
#define IDC_BACKUPDIR_GRP_STATIC (IDD_PREFERENCE_SUB_BACKUP + 1)
|
#define IDC_BACKUPDIR_GRP_STATIC (IDD_PREFERENCE_SUB_BACKUP + 1)
|
||||||
#define IDC_BACKUPDIR_CHECK (IDD_PREFERENCE_SUB_BACKUP + 2)
|
#define IDC_BACKUPDIR_CHECK (IDD_PREFERENCE_SUB_BACKUP + 2)
|
||||||
|
@ -104,7 +104,7 @@ INT_PTR CALLBACK ProjectPanel::run_dlgProc(UINT message, WPARAM wParam, LPARAM l
|
|||||||
NppDarkMode::disableVisualStyle(_hToolbarMenu, NppDarkMode::isEnabled());
|
NppDarkMode::disableVisualStyle(_hToolbarMenu, NppDarkMode::isEnabled());
|
||||||
|
|
||||||
NppDarkMode::setDarkTooltips(_treeView.getHSelf(), NppDarkMode::ToolTipsType::treeview);
|
NppDarkMode::setDarkTooltips(_treeView.getHSelf(), NppDarkMode::ToolTipsType::treeview);
|
||||||
NppDarkMode::redrawTreeViewScrollBar(_treeView.getHSelf());
|
NppDarkMode::setTreeViewStyle(_treeView.getHSelf());
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,9 +26,9 @@ void TreeView::init(HINSTANCE hInst, HWND parent, int treeViewID)
|
|||||||
Window::init(hInst, parent);
|
Window::init(hInst, parent);
|
||||||
_hSelf = ::GetDlgItem(parent, treeViewID);
|
_hSelf = ::GetDlgItem(parent, treeViewID);
|
||||||
|
|
||||||
auto treeViewStyles = WS_HSCROLL | WS_TABSTOP | TVS_LINESATROOT\
|
const auto treeViewStyles = WS_HSCROLL | WS_TABSTOP | TVS_LINESATROOT\
|
||||||
| TVS_HASLINES | TVS_HASBUTTONS | TVS_SHOWSELALWAYS\
|
| TVS_HASLINES | TVS_HASBUTTONS | TVS_SHOWSELALWAYS\
|
||||||
| TVS_EDITLABELS | TVS_INFOTIP | TVS_TRACKSELECT;
|
| TVS_EDITLABELS | TVS_INFOTIP;
|
||||||
|
|
||||||
_hSelf = CreateWindowEx(0,
|
_hSelf = CreateWindowEx(0,
|
||||||
WC_TREEVIEW,
|
WC_TREEVIEW,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user