Update to 20160106 OS X Preview for Developers release.

byuu says:

New update. Most of the work today went into eliminating hiro::Image
from all objects in all ports, replacing with nall::image. That took an
eternity.

Changelog:
- fixed crashing bug when loading games [thanks endrift!!]
- toggling "show status bar" option adjusts window geometry (not
  supposed to recenter the window, though)
- button sizes improved; icon-only button icons no longer being cut off
This commit is contained in:
Tim Allen
2016-01-07 19:14:33 +11:00
parent 4d193d7d94
commit 0b923489dd
308 changed files with 699 additions and 1326 deletions

View File

@@ -118,9 +118,9 @@ auto BrowserDialogWindow::run() -> lstring {
layout.setMargin(5);
pathName.onActivate([&] { setPath(pathName.text()); });
pathRefresh.setBordered(false).setImage(Icon::Action::Refresh).onActivate([&] { setPath(state.path); });
pathHome.setBordered(false).setImage(Icon::Go::Home).onActivate([&] { setPath(userpath()); });
pathUp.setBordered(false).setImage(Icon::Go::Up).onActivate([&] { setPath(dirname(state.path)); });
pathRefresh.setBordered(false).setIcon(Icon::Action::Refresh).onActivate([&] { setPath(state.path); });
pathHome.setBordered(false).setIcon(Icon::Go::Home).onActivate([&] { setPath(userpath()); });
pathUp.setBordered(false).setIcon(Icon::Go::Up).onActivate([&] { setPath(dirname(state.path)); });
view.setBatchable(state.action == "openFiles").onActivate([&] { activate(); }).onChange([&] { change(); });
filterList.setVisible(state.action != "selectFolder").onChange([&] { setPath(state.path); });
for(auto& filter : state.filters) {
@@ -175,7 +175,7 @@ auto BrowserDialogWindow::setPath(string path) -> void {
if(folderMode && isMatch(content)) continue;
view.append(ListViewItem()
.append(ListViewCell().setText(content).setImage(Icon::Emblem::Folder))
.append(ListViewCell().setText(content).setIcon(Icon::Emblem::Folder))
);
}
@@ -185,7 +185,7 @@ auto BrowserDialogWindow::setPath(string path) -> void {
if(!isMatch(content)) continue;
view.append(ListViewItem()
.append(ListViewCell().setText(content).setImage(folderMode ? Icon::Action::Open : Icon::Emblem::File))
.append(ListViewCell().setText(content).setIcon(folderMode ? Icon::Action::Open : Icon::Emblem::File))
);
}

View File

@@ -6,19 +6,19 @@ MessageDialog::MessageDialog(const string& text) {
auto MessageDialog::error(const lstring& buttons) -> string {
state.buttons = buttons;
state.image = Icon::Prompt::Error;
state.icon = Icon::Prompt::Error;
return _run();
}
auto MessageDialog::information(const lstring& buttons) -> string {
state.buttons = buttons;
state.image = Icon::Prompt::Information;
state.icon = Icon::Prompt::Information;
return _run();
}
auto MessageDialog::question(const lstring& buttons) -> string {
state.buttons = buttons;
state.image = Icon::Prompt::Question;
state.icon = Icon::Prompt::Question;
return _run();
}
@@ -39,7 +39,7 @@ auto MessageDialog::setTitle(const string& title) -> type& {
auto MessageDialog::warning(const lstring& buttons) -> string {
state.buttons = buttons;
state.image = Icon::Prompt::Warning;
state.icon = Icon::Prompt::Warning;
return _run();
}
@@ -53,7 +53,7 @@ auto MessageDialog::_run() -> string {
Widget controlSpacer{&controlLayout, Size{~0, 0}};
layout.setMargin(5);
messageIcon.setImage(state.image);
messageIcon.setIcon(state.icon);
messageText.setText(state.text);
for(auto n : range(state.buttons)) {
Button button{&controlLayout, Size{80, 0}, 5};

View File

@@ -15,7 +15,7 @@ struct MessageDialog {
private:
struct State {
lstring buttons;
vector<uint8_t> image;
vector<uint8> icon;
sWindow parent;
string response;
string text;