mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 09:52:27 -04:00
tweaking gui
This commit is contained in:
parent
8e651c8f8e
commit
bcbd40848d
@ -253,7 +253,6 @@ thread_run() {
|
||||
|
||||
double last_progress = -1.0;
|
||||
|
||||
_loop_started = GetTickCount();
|
||||
MSG msg;
|
||||
int retval;
|
||||
retval = GetMessage(&msg, NULL, 0, 0);
|
||||
@ -281,8 +280,7 @@ thread_run() {
|
||||
if (got_install && install_progress != last_progress) {
|
||||
if (_progress_bar == NULL) {
|
||||
// Is it time to create the progress bar?
|
||||
int now = GetTickCount();
|
||||
if (now - _loop_started > 2000) {
|
||||
if (!_install_label.empty()) {
|
||||
make_progress_bar();
|
||||
}
|
||||
} else {
|
||||
@ -464,8 +462,8 @@ update_install_label(const string &install_label) {
|
||||
int bar_height = min((int)(height * 0.1), 24);
|
||||
int bar_y = (height - bar_height * 2);
|
||||
|
||||
int text_width = text_size.cx;
|
||||
int text_height = text_size.cy;
|
||||
int text_width = text_size.cx + 4;
|
||||
int text_height = text_size.cy + 2;
|
||||
int text_x = (width - text_width) / 2;
|
||||
int text_y = bar_y - text_height - 2;
|
||||
|
||||
@ -692,7 +690,7 @@ window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) {
|
||||
SetBkColor(dis->hDC, 0x00ffffff);
|
||||
|
||||
DrawText(dis->hDC, text_buffer, -1, &(dis->rcItem),
|
||||
DT_BOTTOM | DT_CENTER | DT_SINGLELINE);
|
||||
DT_VCENTER | DT_CENTER | DT_SINGLELINE);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -73,8 +73,6 @@ private:
|
||||
double _install_progress;
|
||||
LOCK _install_lock;
|
||||
|
||||
int _loop_started;
|
||||
|
||||
bool _thread_continue;
|
||||
bool _thread_running;
|
||||
HANDLE _thread;
|
||||
|
@ -395,7 +395,7 @@ class Packager:
|
||||
package = self.packager.findPackage(packageName, platform = platform, version = version, requires = self.requires)
|
||||
if package:
|
||||
self.requires.append(package)
|
||||
xrequires = xrequires.NextSiblingElement()
|
||||
xrequires = xrequires.NextSiblingElement('requires')
|
||||
|
||||
self.targetFilenames = {}
|
||||
xcomponent = xpackage.FirstChildElement('component')
|
||||
@ -403,7 +403,7 @@ class Packager:
|
||||
name = xcomponent.Attribute('filename')
|
||||
if name:
|
||||
self.targetFilenames[name] = True
|
||||
xcomponent = xcomponent.NextSiblingElement()
|
||||
xcomponent = xcomponent.NextSiblingElement('component')
|
||||
|
||||
self.moduleNames = {}
|
||||
xmodule = xpackage.FirstChildElement('module')
|
||||
@ -411,7 +411,7 @@ class Packager:
|
||||
moduleName = xmodule.Attribute('name')
|
||||
if moduleName:
|
||||
self.moduleNames[moduleName] = True
|
||||
xmodule = xmodule.NextSiblingElement()
|
||||
xmodule = xmodule.NextSiblingElement('module')
|
||||
|
||||
return True
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user