StyledEdit/DiskUsage/DriveSetup post-hrev46520 fixes

* StyledEdit - make Find/Replace windows non zoomable, select the search
  string view on showing the window for repetitional search;
* Devices - fix plain property list background - to standard one and
  restore read-only state of this pane;
* DriveSetup - remove radio-mode of drive list context popup menu;
* DiskUsage - SetLowColor to parent background to avoid small text
  rendering issue.

Many thanks to Sergei Reznikov for testing and pointing issues out.
This commit is contained in:
Siarzhuk Zharski 2013-12-11 20:35:47 +01:00
parent 07d157db54
commit 372072c899
7 changed files with 29 additions and 6 deletions

View File

@ -45,6 +45,9 @@ PropertyListPlain::AddAttributes(const Attributes& attributes)
BTextView* view = new BTextView(BRect(0, 0, 1000, 1000),
"", BRect(5, 5, 995, 995), B_FOLLOW_ALL_SIDES);
view->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
view->MakeEditable(false);
for (unsigned int i = 0; i < attributes.size(); i++) {
BString attributeLine;
attributeLine << attributes[i].fName

View File

@ -166,8 +166,10 @@ void
PieView::AttachedToWindow()
{
fWindow = (MainWindow*)Window();
if (Parent())
if (Parent()) {
SetViewColor(Parent()->ViewColor());
SetLowColor(Parent()->ViewColor());
}
}

View File

@ -273,7 +273,7 @@ MainWindow::MainWindow()
AddChild(fMenuBar);
// Partition / Drives context menu
fContextMenu = new BPopUpMenu("Partition");
fContextMenu = new BPopUpMenu("Partition", false, false);
fCreateContextMenuItem = new BMenuItem(B_TRANSLATE("Create" B_UTF8_ELLIPSIS),
new BMessage(MSG_CREATE), 'C');
fChangeContextMenuItem = new BMenuItem(

View File

@ -29,8 +29,8 @@
FindWindow::FindWindow(BRect frame, BHandler* _handler, BString* searchString,
bool caseState, bool wrapState, bool backState)
: BWindow(frame, B_TRANSLATE("Find"), B_FLOATING_WINDOW,
B_NOT_RESIZABLE | B_ASYNCHRONOUS_CONTROLS | B_AUTO_UPDATE_SIZE_LIMITS,
B_CURRENT_WORKSPACE)
B_NOT_RESIZABLE | B_NOT_ZOOMABLE | B_ASYNCHRONOUS_CONTROLS
| B_AUTO_UPDATE_SIZE_LIMITS, B_CURRENT_WORKSPACE)
{
AddShortcut('W', B_COMMAND_KEY, new BMessage(MSG_HIDE_WINDOW));
@ -110,6 +110,14 @@ FindWindow::DispatchMessage(BMessage* message, BHandler* handler)
}
void
FindWindow::Show()
{
fSearchString->TextView()->SelectAll();
BWindow::Show();
}
void
FindWindow::_SendMessage()
{

View File

@ -26,6 +26,7 @@ class FindWindow : public BWindow {
virtual void MessageReceived(BMessage* message);
virtual void DispatchMessage(BMessage* message, BHandler* handler);
virtual void Show();
private:
void _SendMessage();

View File

@ -32,8 +32,8 @@ ReplaceWindow::ReplaceWindow(BRect frame, BHandler* _handler,
BString* searchString, BString* replaceString,
bool caseState, bool wrapState, bool backState)
: BWindow(frame, B_TRANSLATE("Replace"), B_FLOATING_WINDOW,
B_NOT_RESIZABLE | B_ASYNCHRONOUS_CONTROLS | B_AUTO_UPDATE_SIZE_LIMITS,
B_CURRENT_WORKSPACE)
B_NOT_RESIZABLE | B_NOT_ZOOMABLE | B_ASYNCHRONOUS_CONTROLS
| B_AUTO_UPDATE_SIZE_LIMITS, B_CURRENT_WORKSPACE)
{
AddShortcut('W', B_COMMAND_KEY, new BMessage(MSG_HIDE_WINDOW));
@ -157,6 +157,14 @@ ReplaceWindow::DispatchMessage(BMessage* message, BHandler* handler)
}
void
ReplaceWindow::Show()
{
fSearchString->TextView()->SelectAll();
BWindow::Show();
}
void
ReplaceWindow::_SendMessage(uint32 what)
{

View File

@ -29,6 +29,7 @@ class ReplaceWindow : public BWindow {
virtual void MessageReceived(BMessage* message);
virtual void DispatchMessage(BMessage* message, BHandler* handler);
virtual void Show();
private:
void _SendMessage(uint32 what);