Redesigned the layout of the styles manager.

Originally committed to SVN as r1334.
This commit is contained in:
Rodrigo Braz Monteiro 2007-07-02 06:18:28 +00:00
parent c70919ff42
commit c01bb02942
7 changed files with 63 additions and 40 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 246 B

After

Width:  |  Height:  |  Size: 246 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 246 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 246 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 246 B

After

Width:  |  Height:  |  Size: 246 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 246 B

View File

@ -72,67 +72,87 @@ DialogStyleManager::DialogStyleManager (wxWindow *parent,SubtitlesGrid *_grid)
CatalogBox->Add(CatalogDelete,0,0,0);
// Storage styles list
StorageList = new wxListBox(this, LIST_STORAGE, wxDefaultPosition, wxSize(260,250), 0, NULL, wxLB_EXTENDED);
StorageList = new wxListBox(this, LIST_STORAGE, wxDefaultPosition, wxSize(240,250), 0, NULL, wxLB_EXTENDED);
wxSizer *StorageBox = new wxStaticBoxSizer(wxVERTICAL, this, _("Storage"));
wxSizer *StorageButtons = new wxBoxSizer(wxHORIZONTAL);
wxSizer *StorageButtonsLow = new wxBoxSizer(wxHORIZONTAL);
wxSizer *StorageButtonsLow = new wxBoxSizer(wxVERTICAL);
wxSizer *StorageListSizer = new wxBoxSizer(wxHORIZONTAL);
MoveToLocal = new wxButton(this, BUTTON_STORAGE_COPYTO, _("Copy to current script ->"), wxDefaultPosition, wxSize(205,25));
StorageNew = new wxButton(this, BUTTON_STORAGE_NEW, _("New"), wxDefaultPosition, wxSize(40,25));
StorageEdit = new wxButton(this, BUTTON_STORAGE_EDIT, _("Edit"), wxDefaultPosition, wxSize(40,25));
StorageCopy = new wxButton(this, BUTTON_STORAGE_COPY, _("Copy"), wxDefaultPosition, wxSize(40,25));
StorageDelete = new wxButton(this, BUTTON_STORAGE_DELETE, _("Delete"), wxDefaultPosition, wxSize(40,25));
StorageButtons->Add(StorageNew,1,wxEXPAND | wxALL,0);
StorageButtons->Add(StorageEdit,1,wxEXPAND | wxALL,0);
StorageButtons->Add(StorageCopy,1,wxEXPAND | wxALL,0);
StorageButtons->Add(StorageNew,1,wxEXPAND | wxRIGHT,5);
StorageButtons->Add(StorageEdit,1,wxEXPAND | wxRIGHT,5);
StorageButtons->Add(StorageCopy,1,wxEXPAND | wxRIGHT,5);
StorageButtons->Add(StorageDelete,1,wxEXPAND | wxALL,0);
StorageMoveUp = new wxButton(this, BUTTON_STORAGE_UP, _("Up"), wxDefaultPosition, wxSize(40,25));
StorageMoveDown = new wxButton(this, BUTTON_STORAGE_DOWN, _("Down"), wxDefaultPosition, wxSize(40,25));
StorageMoveTop = new wxButton(this, BUTTON_STORAGE_TOP, _("Top"), wxDefaultPosition, wxSize(40,25));
StorageMoveBottom = new wxButton(this, BUTTON_STORAGE_BOTTOM, _("Bottom"), wxDefaultPosition, wxSize(40,25));
StorageSort = new wxButton(this, BUTTON_STORAGE_SORT, _("Sort"), wxDefaultPosition, wxSize(40,25));
StorageButtonsLow->Add(StorageMoveTop,1,wxEXPAND | wxALL,0);
StorageButtonsLow->Add(StorageMoveUp,1,wxEXPAND | wxALL,0);
StorageButtonsLow->Add(StorageMoveDown,1,wxEXPAND | wxALL,0);
StorageButtonsLow->Add(StorageMoveBottom,1,wxEXPAND | wxALL,0);
StorageButtonsLow->Add(StorageSort,1,wxEXPAND | wxALL,0);
StorageBox->Add(StorageList,0,wxEXPAND | wxALL,0);
StorageBox->Add(MoveToLocal,0,wxEXPAND | wxALL,0);
StorageBox->Add(StorageButtons,0,wxEXPAND | wxALL,0);
StorageBox->Add(StorageButtonsLow,0,wxEXPAND | wxALL,0);
StorageMoveUp = new wxBitmapButton(this, BUTTON_STORAGE_UP, wxBITMAP(arrow_up));
StorageMoveDown = new wxBitmapButton(this, BUTTON_STORAGE_DOWN, wxBITMAP(arrow_down));
StorageMoveTop = new wxBitmapButton(this, BUTTON_STORAGE_TOP, wxBITMAP(arrow_up_stop));
StorageMoveBottom = new wxBitmapButton(this, BUTTON_STORAGE_BOTTOM, wxBITMAP(arrow_down_stop));
StorageSort = new wxBitmapButton(this, BUTTON_STORAGE_SORT, wxBITMAP(arrow_sort));
StorageMoveUp->SetToolTip(_("Move style up."));
StorageMoveDown->SetToolTip(_("Move style down."));
StorageMoveTop->SetToolTip(_("Move style to top."));
StorageMoveBottom->SetToolTip(_("Move style to bottom."));
StorageSort->SetToolTip(_("Sort styles alphabetically."));
StorageButtonsLow->AddStretchSpacer(1);
StorageButtonsLow->Add(StorageMoveTop,0,wxEXPAND | wxALL,0);
StorageButtonsLow->Add(StorageMoveUp,0,wxEXPAND | wxALL,0);
StorageButtonsLow->Add(StorageMoveDown,0,wxEXPAND | wxALL,0);
StorageButtonsLow->Add(StorageMoveBottom,0,wxEXPAND | wxALL,0);
StorageButtonsLow->Add(StorageSort,0,wxEXPAND | wxALL,0);
StorageButtonsLow->AddStretchSpacer(1);
StorageListSizer->Add(StorageList,1,wxEXPAND | wxRIGHT,0);
StorageListSizer->Add(StorageButtonsLow,0,wxEXPAND | wxALL,0);
StorageBox->Add(StorageListSizer,1,wxEXPAND | wxBOTTOM,5);
StorageBox->Add(MoveToLocal,0,wxEXPAND | wxBOTTOM,5);
StorageBox->Add(StorageButtons,0,wxEXPAND | wxBOTTOM,0);
MoveToLocal->Disable();
StorageEdit->Disable();
StorageCopy->Disable();
StorageDelete->Disable();
// Local styles list
CurrentList = new wxListBox(this, LIST_CURRENT, wxDefaultPosition, wxSize(260,250), 0, NULL, wxLB_EXTENDED);
CurrentList = new wxListBox(this, LIST_CURRENT, wxDefaultPosition, wxSize(240,250), 0, NULL, wxLB_EXTENDED);
wxSizer *CurrentBox = new wxStaticBoxSizer(wxVERTICAL, this, _("Current script"));
wxSizer *CurrentButtons = new wxBoxSizer(wxHORIZONTAL);
wxSizer *CurrentButtonsLow = new wxBoxSizer(wxHORIZONTAL);
MoveToStorage = new wxButton(this, BUTTON_CURRENT_COPYTO, _("<- Copy to storage"), wxDefaultPosition, wxSize(205,25));
wxSizer *CurrentButtonsLow = new wxBoxSizer(wxVERTICAL);
wxSizer *CurrentListSizer = new wxBoxSizer(wxHORIZONTAL);
wxSizer *MoveImportSizer = new wxBoxSizer(wxHORIZONTAL);
MoveToStorage = new wxButton(this, BUTTON_CURRENT_COPYTO, _("<- Copy to storage"), wxDefaultPosition, wxSize(-1,25));
CurrentNew = new wxButton(this, BUTTON_CURRENT_NEW, _("New"), wxDefaultPosition, wxSize(40,25));
CurrentEdit = new wxButton(this, BUTTON_CURRENT_EDIT, _("Edit"), wxDefaultPosition, wxSize(40,25));
CurrentCopy = new wxButton(this, BUTTON_CURRENT_COPY, _("Copy"), wxDefaultPosition, wxSize(40,25));
CurrentDelete = new wxButton(this, BUTTON_CURRENT_DELETE, _("Delete"), wxDefaultPosition, wxSize(40,25));
CurrentButtons->Add(CurrentNew,1,wxEXPAND | wxALL,0);
CurrentButtons->Add(CurrentEdit,1,wxEXPAND | wxALL,0);
CurrentButtons->Add(CurrentCopy,1,wxEXPAND | wxALL,0);
CurrentButtons->Add(CurrentNew,1,wxEXPAND | wxRIGHT,5);
CurrentButtons->Add(CurrentEdit,1,wxEXPAND | wxRIGHT,5);
CurrentButtons->Add(CurrentCopy,1,wxEXPAND | wxRIGHT,5);
CurrentButtons->Add(CurrentDelete,1,wxEXPAND | wxALL,0);
CurrentMoveUp = new wxButton(this, BUTTON_CURRENT_UP, _("Up"), wxDefaultPosition, wxSize(40,25));
CurrentMoveDown = new wxButton(this, BUTTON_CURRENT_DOWN, _("Down"), wxDefaultPosition, wxSize(40,25));
CurrentMoveTop = new wxButton(this, BUTTON_CURRENT_TOP, _("Top"), wxDefaultPosition, wxSize(40,25));
CurrentMoveBottom = new wxButton(this, BUTTON_CURRENT_BOTTOM, _("Bottom"), wxDefaultPosition, wxSize(40,25));
CurrentSort = new wxButton(this, BUTTON_CURRENT_SORT, _("Sort"), wxDefaultPosition, wxSize(40,25));
CurrentButtonsLow->Add(CurrentMoveTop,1,wxEXPAND | wxALL,0);
CurrentButtonsLow->Add(CurrentMoveUp,1,wxEXPAND | wxALL,0);
CurrentButtonsLow->Add(CurrentMoveDown,1,wxEXPAND | wxALL,0);
CurrentButtonsLow->Add(CurrentMoveBottom,1,wxEXPAND | wxALL,0);
CurrentButtonsLow->Add(CurrentSort,1,wxEXPAND | wxALL,0);
CurrentBox->Add(CurrentList,0,wxEXPAND | wxALL,0);
CurrentBox->Add(MoveToStorage,0,wxEXPAND | wxALL,0);
CurrentBox->Add(CurrentButtons,0,wxEXPAND | wxALL,0);
CurrentBox->Add(CurrentButtonsLow,0,wxEXPAND | wxALL,0);
CurrentBox->Add(new wxButton(this, BUTTON_CURRENT_IMPORT, _("Import from script...")),0,wxEXPAND);
CurrentMoveUp = new wxBitmapButton(this, BUTTON_CURRENT_UP, wxBITMAP(arrow_up));
CurrentMoveDown = new wxBitmapButton(this, BUTTON_CURRENT_DOWN, wxBITMAP(arrow_down));
CurrentMoveTop = new wxBitmapButton(this, BUTTON_CURRENT_TOP, wxBITMAP(arrow_up_stop));
CurrentMoveBottom = new wxBitmapButton(this, BUTTON_CURRENT_BOTTOM, wxBITMAP(arrow_down_stop));
CurrentSort = new wxBitmapButton(this, BUTTON_CURRENT_SORT, wxBITMAP(arrow_sort));
CurrentMoveUp->SetToolTip(_("Move style up."));
CurrentMoveDown->SetToolTip(_("Move style down."));
CurrentMoveTop->SetToolTip(_("Move style to top."));
CurrentMoveBottom->SetToolTip(_("Move style to bottom."));
CurrentSort->SetToolTip(_("Sort styles alphabetically."));
CurrentButtonsLow->AddStretchSpacer(1);
CurrentButtonsLow->Add(CurrentMoveTop,0,wxEXPAND | wxALL,0);
CurrentButtonsLow->Add(CurrentMoveUp,0,wxEXPAND | wxALL,0);
CurrentButtonsLow->Add(CurrentMoveDown,0,wxEXPAND | wxALL,0);
CurrentButtonsLow->Add(CurrentMoveBottom,0,wxEXPAND | wxALL,0);
CurrentButtonsLow->Add(CurrentSort,0,wxEXPAND | wxALL,0);
CurrentButtonsLow->AddStretchSpacer(1);
CurrentListSizer->Add(CurrentList,1,wxEXPAND | wxRIGHT,0);
CurrentListSizer->Add(CurrentButtonsLow,0,wxEXPAND | wxALL,0);
MoveImportSizer->Add(MoveToStorage,1,wxEXPAND | wxRIGHT,5);
MoveImportSizer->Add(new wxButton(this, BUTTON_CURRENT_IMPORT, _("Import from script...")),1,wxEXPAND,0);
CurrentBox->Add(CurrentListSizer,1,wxEXPAND | wxBOTTOM,5);
CurrentBox->Add(MoveImportSizer,0,wxEXPAND | wxBOTTOM,5);
CurrentBox->Add(CurrentButtons,0,wxEXPAND | wxBOTTOM,0);
MoveToStorage->Disable();
CurrentEdit->Disable();
CurrentCopy->Disable();

View File

@ -139,6 +139,9 @@ visual_realtime BITMAP "bitmaps/visual_realtime.bmp"
arrow_up BITMAP "bitmaps/arrow_up.bmp"
arrow_down BITMAP "bitmaps/arrow_down.bmp"
arrow_up_stop BITMAP "bitmaps/arrow_up_stop.bmp"
arrow_down_stop BITMAP "bitmaps/arrow_down_stop.bmp"
arrow_sort BITMAP "bitmaps/arrow_sort.bmp"
splash BITMAP "bitmaps/splash.bmp"