LibGUI: Use ControlBoxButtons in SpinBox and ComboBox

Converts the buttons of these widgets into ControlBoxButtons.
This commit is contained in:
thankyouverycool 2020-07-19 10:23:12 -04:00 committed by Andreas Kling
parent bf59cd7ca5
commit c90fe7ce93
Notes: sideshowbarker 2024-07-19 04:42:22 +09:00
4 changed files with 12 additions and 11 deletions

View file

@ -24,8 +24,8 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <LibGUI/Button.h>
#include <LibGUI/ComboBox.h>
#include <LibGUI/ControlBoxButton.h>
#include <LibGUI/Desktop.h>
#include <LibGUI/ListView.h>
#include <LibGUI/Model.h>
@ -89,9 +89,8 @@ ComboBox::ComboBox()
m_open_button->click();
};
m_open_button = add<Button>();
m_open_button = add<ControlBoxButton>(ControlBoxButton::DownArrow);
m_open_button->set_focusable(false);
m_open_button->set_text("\xE2\xAC\x87"); // DOWNWARDS BLACK ARROW
m_open_button->on_click = [this](auto) {
if (m_list_window->is_visible())
close();