[apps] Change app icons

Change-Id: I8857c28eb4669d974eb8747f3e62862ab9e79174
This commit is contained in:
Émilie Feral
2017-01-24 13:28:02 +01:00
parent 51881d841c
commit bea205425e
11 changed files with 13 additions and 8 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 459 B

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 459 B

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@@ -20,9 +20,9 @@ View * AppCell::subviewAtIndex(int index) {
}
void AppCell::layoutSubviews() {
m_iconView.setFrame(KDRect(0,0,k_iconSize,k_iconSize));
if (bounds().height() > k_iconSize) {
m_nameView.setFrame(KDRect(0, k_iconSize, bounds().width(), bounds().height()-k_iconSize));
m_iconView.setFrame(KDRect(0,0,k_iconWidth,k_iconHeight));
if (bounds().height() > k_iconHeight) {
m_nameView.setFrame(KDRect(0, k_iconHeight, bounds().width(), bounds().height()-k_iconHeight));
}
}

View File

@@ -17,7 +17,8 @@ public:
void reloadCell() override;
void setApp(::App * app);
private:
static constexpr KDCoordinate k_iconSize = 32;
static constexpr KDCoordinate k_iconWidth = 55;
static constexpr KDCoordinate k_iconHeight = 56;
ImageView m_iconView;
PointerTextView m_nameView;
bool m_visible;

View File

@@ -43,11 +43,11 @@ int Controller::numberOfColumns() {
}
KDCoordinate Controller::cellHeight() {
return 50;
return 98;
}
KDCoordinate Controller::cellWidth() {
return 50;
return 104;
}
TableViewCell * Controller::reusableCell(int index) {

View File

@@ -20,6 +20,8 @@ app_objs += $(addprefix apps/probability/,\
parameters_controller.o\
)
app_images += apps/probability/probability_icon.png
app_images += $(addprefix apps/probability/images/,\
binomial_icon.png\
calcul1_icon.png\
@@ -36,6 +38,5 @@ app_images += $(addprefix apps/probability/images/,\
focused_uniform_icon.png\
normal_icon.png\
poisson_icon.png\
probability_icon.png\
uniform_icon.png\
)

View File

@@ -1,5 +1,5 @@
#include "app.h"
#include "images/probability_icon.h"
#include "probability_icon.h"
namespace Probability {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 440 B

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 459 B

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 459 B

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@@ -23,6 +23,9 @@ void fileNameToSnakeCaseName(const char * fileName, char * snakeCaseName, size_t
void snakeCaseNameToUpperSnakeName(const char * snakeCaseName, char * upperSnakeCaseName, size_t maxLength);
void camelCaseNameFromSnakeCaseNames(const char * snakeCaseName, const char * upperSnakeCaseName, char * camelCaseName, size_t maxLength);
// TODO: fix inliner to handle any png file
// TODO: truncate the app image dimensions to 55x56 pixels
int main(int argc, char * argv[]) {
ERROR_IF(argc != 2, "Usage: inliner source.png");
const char * inputPath = argv[1];