mirror of
https://github.com/rizinorg/cutter.git
synced 2025-01-04 19:15:25 +00:00
23 lines
522 B
C++
23 lines
522 B
C++
#pragma once
|
|
|
|
#include <QComboBox>
|
|
/**
|
|
* @brief Custom QComboBox created to prevent the menu popup from opening up at different
|
|
* offsets for different items, which may result in list items being rendered outside
|
|
* of the screen/containing widget.
|
|
*/
|
|
class DirectionalComboBox : public QComboBox
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit DirectionalComboBox(QWidget *parent = nullptr, bool upwards = true);
|
|
|
|
void setPopupDirection(bool upwards);
|
|
|
|
private:
|
|
bool popupUpwards;
|
|
|
|
void showPopup();
|
|
};
|