diff options
Diffstat (limited to 'linden/indra/newview/llfloaternamedesc.cpp')
-rw-r--r-- | linden/indra/newview/llfloaternamedesc.cpp | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/linden/indra/newview/llfloaternamedesc.cpp b/linden/indra/newview/llfloaternamedesc.cpp index 4c0cefa..f49c951 100644 --- a/linden/indra/newview/llfloaternamedesc.cpp +++ b/linden/indra/newview/llfloaternamedesc.cpp | |||
@@ -106,10 +106,10 @@ BOOL LLFloaterNameDesc::postBuild() | |||
106 | 106 | ||
107 | setTitle(mFilename); | 107 | setTitle(mFilename); |
108 | 108 | ||
109 | centerWindow(); | 109 | centerWithin(gViewerWindow->getRootView()->getRect()); |
110 | 110 | ||
111 | S32 line_width = mRect.getWidth() - 2 * PREVIEW_HPAD; | 111 | S32 line_width = getRect().getWidth() - 2 * PREVIEW_HPAD; |
112 | S32 y = mRect.getHeight() - PREVIEW_LINE_HEIGHT; | 112 | S32 y = getRect().getHeight() - PREVIEW_LINE_HEIGHT; |
113 | 113 | ||
114 | r.setLeftTopAndSize( PREVIEW_HPAD, y, line_width, PREVIEW_LINE_HEIGHT ); | 114 | r.setLeftTopAndSize( PREVIEW_HPAD, y, line_width, PREVIEW_LINE_HEIGHT ); |
115 | y -= PREVIEW_LINE_HEIGHT; | 115 | y -= PREVIEW_LINE_HEIGHT; |
@@ -158,19 +158,6 @@ LLFloaterNameDesc::~LLFloaterNameDesc() | |||
158 | gFocusMgr.releaseFocusIfNeeded( this ); // calls onCommit() | 158 | gFocusMgr.releaseFocusIfNeeded( this ); // calls onCommit() |
159 | } | 159 | } |
160 | 160 | ||
161 | //----------------------------------------------------------------------------- | ||
162 | // centerWindow() | ||
163 | //----------------------------------------------------------------------------- | ||
164 | void LLFloaterNameDesc::centerWindow() | ||
165 | { | ||
166 | LLRect window_rect = gViewerWindow->getRootView()->getRect(); | ||
167 | |||
168 | S32 dialog_left = window_rect.mLeft + (window_rect.getWidth() - mRect.getWidth()) / 2; | ||
169 | S32 dialog_bottom = window_rect.mBottom + (window_rect.getHeight() - mRect.getHeight()) / 2; | ||
170 | |||
171 | translate( dialog_left - mRect.mLeft, dialog_bottom - mRect.mBottom ); | ||
172 | } | ||
173 | |||
174 | // Sub-classes should override this function if they allow editing | 161 | // Sub-classes should override this function if they allow editing |
175 | //----------------------------------------------------------------------------- | 162 | //----------------------------------------------------------------------------- |
176 | // onCommit() | 163 | // onCommit() |