Some tweaks to word drop down list

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@619 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2007-08-23 17:37:44 +00:00
parent c3e10f2ccf
commit dc9f08b311
5 changed files with 61 additions and 21 deletions
+2 -2
View File
@@ -84,7 +84,7 @@ DropDownList::~DropDownList() {
delete hider2;
}
void DropDownList::show(bool in_place, wxPoint pos) {
void DropDownList::show(bool in_place, wxPoint pos, RealRect* rect) {
if (IsShown()) return;
onShow();
// find selection
@@ -111,7 +111,7 @@ void DropDownList::show(bool in_place, wxPoint pos) {
int parent_height = 0;
if (!in_place && viewer) {
// Position the drop down list below the editor control (based on the style)
RealRect r = viewer->viewer.getRotation().trNoNeg(viewer->getStyle()->getRect());
RealRect r = viewer->viewer.getRotation().trNoNeg(rect ? *rect : viewer->getStyle()->getRect());
if (viewer->viewer.nativeLook()) {
pos = RealPoint(r.x - 3, r.y - 3);
size.width = max(size.width, r.width + 6);