* Also show the tool tip in case there is no monitor info, but still info about
the device. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34660 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1179,13 +1179,7 @@ ScreenWindow::_UpdateMonitor()
|
|||||||
monitor_info info;
|
monitor_info info;
|
||||||
float diagonalInches;
|
float diagonalInches;
|
||||||
status_t status = fScreenMode.GetMonitorInfo(info, &diagonalInches);
|
status_t status = fScreenMode.GetMonitorInfo(info, &diagonalInches);
|
||||||
|
if (status == B_OK) {
|
||||||
if (status != B_OK) {
|
|
||||||
if (!fMonitorInfo->IsHidden())
|
|
||||||
fMonitorInfo->Hide();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
char text[512];
|
char text[512];
|
||||||
snprintf(text, sizeof(text), "%s%s%s %g\"", info.vendor,
|
snprintf(text, sizeof(text), "%s%s%s %g\"", info.vendor,
|
||||||
info.name[0] ? " " : "", info.name, diagonalInches);
|
info.name[0] ? " " : "", info.name, diagonalInches);
|
||||||
@@ -1194,10 +1188,16 @@ ScreenWindow::_UpdateMonitor()
|
|||||||
|
|
||||||
if (fMonitorInfo->IsHidden())
|
if (fMonitorInfo->IsHidden())
|
||||||
fMonitorInfo->Show();
|
fMonitorInfo->Show();
|
||||||
|
} else {
|
||||||
|
if (!fMonitorInfo->IsHidden())
|
||||||
|
fMonitorInfo->Hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
char text[512];
|
||||||
size_t length = 0;
|
size_t length = 0;
|
||||||
text[0] = 0;
|
text[0] = 0;
|
||||||
|
|
||||||
|
if (status == B_OK) {
|
||||||
if (info.min_horizontal_frequency != 0
|
if (info.min_horizontal_frequency != 0
|
||||||
&& info.min_vertical_frequency != 0
|
&& info.min_vertical_frequency != 0
|
||||||
&& info.max_pixel_clock != 0) {
|
&& info.max_pixel_clock != 0) {
|
||||||
@@ -1219,6 +1219,7 @@ ScreenWindow::_UpdateMonitor()
|
|||||||
" (%u/%u)", info.produced.week, info.produced.year);
|
" (%u/%u)", info.produced.week, info.produced.year);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Add info about the graphics device
|
// Add info about the graphics device
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user