notepad4 icon indicating copy to clipboard operation
notepad4 copied to clipboard

Redesign Find & Replace dialog

Open zufuliu opened this issue 1 month ago • 7 comments

Image

我认为这些开关应该梳理一遍,现在的排序逻辑很混乱。

不用的就去掉,再根据“通用”、“普通替换”、“正则替换”用 frame 或 tab 分类。

这是我做的一个概念。第一行两个功能选项,点到查找时直接禁用替换相关控件就可以了,这样界面就不用变来变去。 Image

也可以像Notepad--一样,把

  • 替换后关闭
  • 使用等宽字体
  • 离开对话框后进入透明模式

等内容做到独立的一个设置面板,减少主界面的内容。

Image

Originally posted by @Mapaler in #1019

zufuliu avatar Nov 18 '25 11:11 zufuliu

Another option is using drop-down button, it's much simpler than using tab control. https://learn.microsoft.com/en-us/windows/win32/controls/handle-drop-down-buttons

zufuliu avatar Nov 18 '25 11:11 zufuliu

I prefer current simple design. It would be better if we could adjust the order of some checkboxes. move "Transform backslashes" above "Regular expression search". (It is simplier than regex. User may only use \n, \t.) move "Use Boost Regex" to left, and make three regex checkbox together. move "Transparent on losing focus to right"

jack6th avatar Nov 20 '25 01:11 jack6th

and make three regex checkbox together.

Another way to achieve this is simply swap "Bookmark matched line" and "Use Boost Regex".

zufuliu avatar Nov 20 '25 04:11 zufuliu

Many of the current options conflict with each other, making it difficult to understand their meaning.

At the very least, it should be like Notepad-- with the search mode separated into its own frame.

ImageImage

Mapaler avatar Nov 20 '25 11:11 Mapaler

Many of the current options conflict with each other, making it difficult to understand their meaning.

Another approach is to add logic between the checkboxes. (Just like the Replace dialog box in Notepad3 or Geany does.)

  1. If Wildcard Search checked, uncheck three regex checkboxes, and gray out Transfrom backslashes.
  2. If any regex checkbox checked, uncheck Wildcard Search, and gray out Transfrom backslashes, Match whole word only, Match beginning of word only three checkboxes.
  3. If Use Boost Regex checked, auto check Regular expression search.
  4. If Use Boost Regex unchecked, gray out Regex dot (.) match newline.

jack6th avatar Nov 22 '25 07:11 jack6th

Another option is using drop-down button, it's much simpler than using tab control.

Windows 11's Notepad does this. Image

and gray out Transform backslashes.

Disable other checkboxes (using EnableWindow function) will prevent change search options, looks not good. just change the text color (e.g. to gray) for other checkboxes would be better?

zufuliu avatar Nov 23 '25 00:11 zufuliu

Disable other checkboxes (using EnableWindow function) will prevent change search options, looks not good. just change the text color (e.g. to gray) for other checkboxes would be better?

Place the options for different modes in separate frames/groups, stack them at the same coordinates, and set the visibility of the frames for the other modes to false. This way, you can achieve a tab-like effect without using tabs. The downside is that it is not convenient for visual editing.

中文原文 将不同模式的选项放在不同的frame/group里,叠加在同一个坐标,将其他模式的frame的visible修改为false,这样可以不需要tab但是实现类似tab的效果。缺点是不方便可视化编辑。

If convenient visual editing is needed, I have previously looked into FastCopy. It makes each page into a separate dialog and switches the currently displayed dialog through a listbox.

中文原文 如果需要方便可视化编辑,我之前研究过 FastCopy,它是每一个页面做成一个独立的dialog,通过listbox切换当前显示的dialog。
Image Image

And the software I often use, XnViewMP, Total Commander, and MPC-HC, all use this design.

中文原文 我常用的软件,XnViewMP、Total Commander、MPC-HC都采用了这个设计。
Image Image Image

Mapaler avatar Nov 23 '25 02:11 Mapaler