@@ -29,6 +29,8 @@ namespace curve_editor {
2929 hwnd_button_bg_image_path_ = ::GetDlgItem (hwnd, IDC_BUTTON_BACKGROUND_IMAGE);
3030 hwnd_slider_bg_image_opacity_ = ::GetDlgItem (hwnd, IDC_SLIDER_IMAGE_OPACITY);
3131 hwnd_static_bg_image_opacity_ = ::GetDlgItem (hwnd, IDC_STATIC_IMAGE_OPACITY);
32+ hwnd_static_apply_button_height_ = ::GetDlgItem (hwnd, IDC_STATIC_APPLY_BUTTON_HEIGHT);
33+ hwnd_slider_apply_button_height_ = ::GetDlgItem (hwnd, IDC_SLIDER_APPLY_BUTTON_HEIGHT);
3234 hwnd_check_show_trace_ = ::GetDlgItem (hwnd, IDC_CHECK_SHOW_TRACE);
3335 hwnd_check_enable_animation_ = ::GetDlgItem (hwnd, IDC_CHECK_ENABLE_ANIMATION);
3436
@@ -44,6 +46,7 @@ namespace curve_editor {
4446 ::SendMessageA (hwnd_slider_curve_thickness_, TBM_SETRANGE, TRUE , MAKELPARAM(1 , 100 ));
4547 ::SendMessageA (hwnd_slider_curve_quality_, TBM_SETRANGE, TRUE , MAKELPARAM(100 , 1000 ));
4648 ::SendMessageA (hwnd_slider_bg_image_opacity_, TBM_SETRANGE, TRUE , MAKELPARAM(0 , 100 ));
49+ ::SendMessageA (hwnd_slider_apply_button_height_, TBM_SETRANGE, TRUE , MAKELPARAM(30 , 200 ));
4750 }
4851
4952
@@ -78,6 +81,10 @@ namespace curve_editor {
7881 int value_int = ::SendMessageA (hwnd_slider_bg_image_opacity_, TBM_GETPOS, NULL , NULL );
7982 ::SetWindowTextA (hwnd_static_bg_image_opacity_, std::format(" {}%" , value_int).c_str());
8083 }
84+ else if (lparam == (LPARAM)hwnd_slider_apply_button_height_) {
85+ int value_int = ::SendMessageA (hwnd_slider_apply_button_height_, TBM_GETPOS, NULL , NULL );
86+ ::SetWindowTextA (hwnd_static_apply_button_height_, std::format(" {}" , value_int).c_str());
87+ }
8188 return TRUE ;
8289
8390 case WM_PAINT:
@@ -143,10 +150,12 @@ namespace curve_editor {
143150 ::SendMessageA (hwnd_slider_curve_thickness_, TBM_SETPOS, TRUE , (LPARAM)(global::config.get_curve_thickness() * 10.f));
144151 ::SendMessageA (hwnd_slider_curve_quality_, TBM_SETPOS, TRUE , (LPARAM)(global::config.get_curve_resolution()));
145152 ::SendMessageA (hwnd_slider_bg_image_opacity_, TBM_SETPOS, TRUE , (LPARAM)round(global::config.get_bg_image_opacity() * 100.f));
153+ ::SendMessageA (hwnd_slider_apply_button_height_, TBM_SETPOS, TRUE , (LPARAM)global::config.get_apply_button_height());
146154
147155 ::SendMessageA (hwnd, WM_HSCROLL, NULL , (LPARAM)hwnd_slider_curve_thickness_);
148156 ::SendMessageA (hwnd, WM_HSCROLL, NULL , (LPARAM)hwnd_slider_curve_quality_);
149157 ::SendMessageA (hwnd, WM_HSCROLL, NULL , (LPARAM)hwnd_slider_bg_image_opacity_);
158+ ::SendMessageA (hwnd, WM_HSCROLL, NULL , (LPARAM)hwnd_slider_apply_button_height_);
150159
151160 return TRUE ;
152161
@@ -162,10 +171,12 @@ namespace curve_editor {
162171 global::config.set_curve_resolution (
163172 (uint32_t )::SendMessageA (hwnd_slider_curve_quality_, TBM_GETPOS, NULL , NULL )
164173 );
165-
166174 global::config.set_bg_image_opacity (
167175 (float )::SendMessageA (hwnd_slider_bg_image_opacity_, TBM_GETPOS, NULL , NULL ) * 0 .01f
168176 );
177+ global::config.set_apply_button_height (
178+ (uint32_t )::SendMessageA (hwnd_slider_apply_button_height_, TBM_GETPOS, NULL , NULL )
179+ );
169180 {
170181 char buffer[MAX_PATH];
171182 ::GetWindowTextA (hwnd_edit_bg_image_path_, buffer, MAX_PATH);
0 commit comments