Skip to content

Commit

Permalink
Version 0.10.9: langs updated, moved shadow icons to separate files.
Browse files Browse the repository at this point in the history
  • Loading branch information
john-preston committed Oct 1, 2016
1 parent 3d2f025 commit ef2faf6
Show file tree
Hide file tree
Showing 48 changed files with 297 additions and 460 deletions.
Binary file modified Telegram/Resources/art/sprite.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Telegram/Resources/art/sprite_200x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 13 additions & 24 deletions Telegram/Resources/basic.style
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ semiboldButtonBlueText: #2b99d5;
wndMinHeight: 480px;
wndDefWidth: 800px;
wndDefHeight: 600px;
wndShadow: sprite(209px, 46px, 19px, 19px);
wndShadow: icon {{ "window_shadow", windowShadowFg }};
wndShadowShift: 1px;

layerAlpha: 0.5;
Expand Down Expand Up @@ -298,10 +298,11 @@ solidScroll: flatScroll {
duration: 150;
hiding: 0;
}
defaultDropdownShadow: icon {{ "dropdown_shadow", windowShadowFg }};
defaultPopupMenu: PopupMenu {
skip: 5px;

shadow: sprite(241px, 46px, 6px, 6px);
shadow: defaultDropdownShadow;
shadowShift: 1px;

itemBg: white;
Expand All @@ -320,7 +321,7 @@ defaultPopupMenu: PopupMenu {
separatorWidth: 1px;
separatorFg: #f1f1f1;

arrow: sprite(0px, 126px, 4px, 7px);
arrow: icon {{ "dropdown_submenu_arrow", #373737 }};

duration: 120;

Expand Down Expand Up @@ -687,7 +688,7 @@ btnIntroNext: flatButton(btnDefNext, btnDefBig) {
radius: buttonRadius;
}

boxShadow: sprite(363px, 50px, 15px, 15px);
boxShadow: icon {{ "box_shadow", windowShadowFg }};
boxShadowShift: 2px;

introCountry: countryInput {
Expand Down Expand Up @@ -1211,37 +1212,27 @@ btnBotKbHide: iconedButton(btnAttachEmoji) {
downIcon: sprite(373px, 95px, 23px, 14px);
downIconPos: point(5px, 17px);
}
broadcastToggle: flatCheckbox {
silentToggle: flatCheckbox {
textColor: black;
bgColor: white;
disColor: black;

width: 34px;
width: 33px;
height: 46px;
duration: 200;
bgFunc: transition(easeOutCirc);
cursor: cursor(pointer);

font: normalFont;

imageRect: sprite(18px, 125px, 22px, 21px);
chkImageRect: sprite(40px, 125px, 22px, 21px);
overImageRect: sprite(40px, 104px, 22px, 21px);
chkOverImageRect: sprite(40px, 125px, 22px, 21px);
disImageRect: sprite(18px, 125px, 22px, 21px);
chkDisImageRect: sprite(18px, 125px, 22px, 21px);

imagePos: point(6px, 12px);
}
silentToggle: flatCheckbox(broadcastToggle) {
width: 33px;

imageRect: sprite(354px, 242px, 21px, 21px);
chkImageRect: sprite(354px, 221px, 21px, 21px);
overImageRect: sprite(375px, 242px, 21px, 21px);
chkOverImageRect: sprite(375px, 221px, 21px, 21px);
disImageRect: sprite(354px, 242px, 21px, 21px);
chkDisImageRect: sprite(354px, 221px, 21px, 21px);

imagePos: point(6px, 12px);
}
btnRecordAudio: sprite(379px, 390px, 16px, 24px);
btnRecordAudioActive: sprite(379px, 366px, 16px, 24px);
Expand Down Expand Up @@ -1538,17 +1529,15 @@ dropdownDef: dropdown {
borderColor: #ebebeb;

padding: margins(10px, 10px, 10px, 10px);
shadow: sprite(241px, 46px, 6px, 6px);
shadow: defaultDropdownShadow;
shadowShift: 1px;

duration: 150;
width: 0px;
}

defaultInnerDropdownShadow: icon {{ "dropdown_shadow", windowShadowFg }};
defaultInnerDropdown: InnerDropdown {
padding: margins(10px, 10px, 10px, 10px);
shadow: defaultInnerDropdownShadow;
shadow: defaultDropdownShadow;
shadowShift: 1px;

duration: 150;
Expand Down Expand Up @@ -1838,7 +1827,7 @@ mvControlSize: 90px;
mvIconSize: size(60px, 56px);

mvDropdown: dropdown(dropdownDef) {
shadow: sprite(0px, 0px, 0px, 0px);
shadow: icon {};
padding: margins(11px, 12px, 11px, 12px);

border: 0px;
Expand All @@ -1863,7 +1852,7 @@ mvButton: iconedButton(btnDefIconed) {
duration: 0;
}
mvPopupMenu: PopupMenu(defaultPopupMenu) {
shadow: sprite(0px, 0px, 0px, 0px);
shadow: icon {};

itemBg: #383838;
itemBgOver: #505050;
Expand Down
6 changes: 3 additions & 3 deletions Telegram/Resources/basic_types.style
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ dropdown {
borderColor: color;

padding: margins;
shadow: sprite;
shadow: icon;
shadowShift: pixels;

duration: int;
Expand All @@ -255,7 +255,7 @@ InnerDropdown {
PopupMenu {
skip: pixels;

shadow: sprite;
shadow: icon;
shadowShift: pixels;

itemBg: color;
Expand All @@ -273,7 +273,7 @@ PopupMenu {
separatorWidth: pixels;
separatorFg: color;

arrow: sprite;
arrow: icon;

duration: int;

Expand Down
Binary file added Telegram/Resources/icons/box_shadow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Telegram/Resources/icons/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Telegram/Resources/icons/dropdown_submenu_arrow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Telegram/Resources/icons/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Telegram/Resources/icons/window_shadow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Telegram/Resources/icons/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 6 additions & 6 deletions Telegram/Resources/langs/lang_ko.strings
Original file line number Diff line number Diff line change
Expand Up @@ -772,12 +772,12 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
"lng_allow_bot" = "허용";

"lng_bot_start" = "시작";
"lng_bot_choose_group" = "Select a Group";
"lng_bot_choose_group" = "그룹방 선택";
"lng_bot_no_groups" = "그룹이 존재하지 않습니다.";
"lng_bot_groups_not_found" = "그룹을 찾을 수 없습니다.";
"lng_bot_sure_invite" = "<<{group}>>에 봇을 추가 하시겠습니까?";
"lng_bot_already_in_group" = "봇이 이미 그룹의 멤버입니다.";
"lng_bot_choose_chat" = "Select a Chat";
"lng_bot_choose_chat" = "채팅방 선택";
"lng_bot_no_chats" = "채팅방이 없습니다.";
"lng_bot_chats_not_found" = "채팅방을 찾 을 수 없음";
"lng_bot_sure_share_game" = "{user}에게 게임을 공유하겠습니까?";
Expand All @@ -787,10 +787,10 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
"lng_user_typing" = "{user}님이 입력중입니다.";
"lng_users_typing" = "{user}님과 {second_user}님이 입력중입니다.";
"lng_many_typing" = "{count:_not_used_|#명이|#명이} 입력중입니다";
"lng_playing_game" = "playing a game";
"lng_user_playing_game" = "{user} is playing a game";
"lng_users_playing_game" = "{user} and {second_user} are playing a game";
"lng_many_playing_game" = "{count:_not_used_|# is|# are} playing a game";
"lng_playing_game" = "게임 중";
"lng_user_playing_game" = "{user}님이 게임 중입니다.";
"lng_users_playing_game" = "{user}님과 {second_user}님이 게임 중입니다.";
"lng_many_playing_game" = "{count:_not_used_|#명이|#명이} 게임 중입니다";
"lng_send_action_record_video" = "비디오 녹화 중";
"lng_user_action_record_video" = "{user}님이 녹화중입니다";
"lng_send_action_upload_video" = "비디오 전송 중";
Expand Down
1 change: 1 addition & 0 deletions Telegram/SourceFiles/application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
#include "lang.h"
#include "boxes/confirmbox.h"
#include "ui/filedialog.h"
#include "ui/popupmenu.h"
#include "langloaderplain.h"
#include "localstorage.h"
#include "autoupdater.h"
Expand Down
2 changes: 1 addition & 1 deletion Telegram/SourceFiles/boxes/abstractbox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ void AbstractBox::resizeMaxHeight(int32 newWidth, int32 maxHeight) {
move(r.left(), newTop);
}
}
parentWidget()->update(geometry().united(g).marginsAdded(QMargins(st::boxShadow.pxWidth(), st::boxShadow.pxHeight(), st::boxShadow.pxWidth(), st::boxShadow.pxHeight())));
parentWidget()->update(geometry().united(g).marginsAdded(QMargins(st::boxShadow.width(), st::boxShadow.height(), st::boxShadow.width(), st::boxShadow.height())));
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion Telegram/SourceFiles/boxes/stickersetbox.h
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ private slots:
int _dragging = -1;
int _above = -1;

BoxShadow _aboveShadow;
Ui::RectShadow _aboveShadow;

int32 _scrollbar = 0;
};
Expand Down
4 changes: 0 additions & 4 deletions Telegram/SourceFiles/codegen/style/parsed_file.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -769,10 +769,6 @@ structure::Value ParsedFile::readIconValue() {
}
}

if (parts.empty()) {
logErrorUnexpectedToken() << "at least one icon part";
return {};
}
return { structure::data::icon { parts } };
}
file_.putBack();
Expand Down
1 change: 1 addition & 0 deletions Telegram/SourceFiles/core/click_handler_types.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
#include "core/qthelp_regex.h"
#include "core/qthelp_url.h"
#include "localstorage.h"
#include "ui/popupmenu.h"

QString UrlClickHandler::copyToClipboardContextItemText() const {
return lang(isEmail() ? lng_context_copy_email : lng_context_copy_link);
Expand Down
1 change: 1 addition & 0 deletions Telegram/SourceFiles/dialogswidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
#include "dialogs/dialogs_layout.h"
#include "styles/style_dialogs.h"
#include "ui/buttons/round_button.h"
#include "ui/popupmenu.h"
#include "data/data_drafts.h"
#include "lang.h"
#include "application.h"
Expand Down
4 changes: 3 additions & 1 deletion Telegram/SourceFiles/dialogswidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org

#include "window/section_widget.h"

class MainWidget;
namespace Dialogs {
class Row;
class FakeRow;
Expand All @@ -33,6 +32,9 @@ namespace Ui {
class RoundButton;
} // namespace Ui

class MainWidget;
class PopupMenu;

enum DialogsSearchRequestType {
DialogsSearchFromStart,
DialogsSearchFromOffset,
Expand Down
4 changes: 2 additions & 2 deletions Telegram/SourceFiles/dropdown.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ void Dropdown::resizeEvent(QResizeEvent *e) {
}

void Dropdown::paintEvent(QPaintEvent *e) {
QPainter p(this);
Painter p(this);

if (_a_appearance.animating()) {
p.setOpacity(a_opacity.current());
Expand Down Expand Up @@ -358,7 +358,7 @@ void DragArea::setText(const QString &text, const QString &subtext) {
}

void DragArea::paintEvent(QPaintEvent *e) {
QPainter p(this);
Painter p(this);

if (_a_appearance.animating()) {
p.setOpacity(a_opacity.current());
Expand Down
21 changes: 11 additions & 10 deletions Telegram/SourceFiles/dropdown.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
#pragma once

#include "ui/twidget.h"
#include "ui/boxshadow.h"
#include "ui/effects/rect_shadow.h"

class Dropdown : public TWidget {
Q_OBJECT
Expand Down Expand Up @@ -91,7 +91,7 @@ public slots:

QTimer _hideTimer;

BoxShadow _shadow;
Ui::RectShadow _shadow;

};

Expand All @@ -101,13 +101,6 @@ class DragArea : public TWidget {
public:
DragArea(QWidget *parent);

void paintEvent(QPaintEvent *e);
void mouseMoveEvent(QMouseEvent *e);
void dragEnterEvent(QDragEnterEvent *e);
void dragLeaveEvent(QDragLeaveEvent *e);
void dropEvent(QDropEvent *e);
void dragMoveEvent(QDragMoveEvent *e);

void setText(const QString &text, const QString &subtext);

void otherEnter();
Expand All @@ -127,6 +120,14 @@ class DragArea : public TWidget {
).contains(QRect(mapFromGlobal(globalRect.topLeft()), globalRect.size()));
}

protected:
void paintEvent(QPaintEvent *e) override;
void mouseMoveEvent(QMouseEvent *e) override;
void dragEnterEvent(QDragEnterEvent *e) override;
void dragLeaveEvent(QDragLeaveEvent *e) override;
void dropEvent(QDropEvent *e) override;
void dragMoveEvent(QDragMoveEvent *e) override;

signals:
void dropped(const QMimeData *data);

Expand All @@ -143,7 +144,7 @@ public slots:
anim::cvalue a_color;
Animation _a_appearance;

BoxShadow _shadow;
Ui::RectShadow _shadow;

QString _text, _subtext;

Expand Down
7 changes: 1 addition & 6 deletions Telegram/SourceFiles/history/field_autocomplete.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,8 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
FieldAutocomplete::FieldAutocomplete(QWidget *parent) : TWidget(parent)
, _scroll(this, st::mentionScroll)
, _inner(this, &_mrows, &_hrows, &_brows, &_srows)
, _chat(0)
, _user(0)
, _channel(0)
, _hiding(false)
, a_opacity(0)
, _a_appearance(animation(this, &FieldAutocomplete::step_appearance))
, _shadow(st::dropdownDef.shadow) {
, _a_appearance(animation(this, &FieldAutocomplete::step_appearance)) {
_hideTimer.setSingleShot(true);
connect(&_hideTimer, SIGNAL(timeout()), this, SLOT(hideStart()));

Expand Down
14 changes: 7 additions & 7 deletions Telegram/SourceFiles/history/field_autocomplete.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
#pragma once

#include "ui/twidget.h"
#include "ui/boxshadow.h"
#include "ui/effects/rect_shadow.h"

namespace internal {

Expand Down Expand Up @@ -91,9 +91,10 @@ public slots:

void showStart();

private:
protected:
void paintEvent(QPaintEvent *e) override;

private:
void updateFiltered(bool resetScroll = false);
void recount(bool resetScroll = false);

Expand All @@ -108,9 +109,9 @@ public slots:
ChildWidget<ScrollArea> _scroll;
ChildWidget<internal::FieldAutocompleteInner> _inner;

ChatData *_chat;
UserData *_user;
ChannelData *_channel;
ChatData *_chat = nullptr;
UserData *_user = nullptr;
ChannelData *_channel = nullptr;
EmojiPtr _emoji;
enum class Type {
Mentions,
Expand All @@ -124,14 +125,13 @@ public slots:
bool _addInlineBots;

int32 _width, _height;
bool _hiding;
bool _hiding = false;

anim::fvalue a_opacity;
Animation _a_appearance;

QTimer _hideTimer;

BoxShadow _shadow;
friend class internal::FieldAutocompleteInner;

};
Expand Down
Loading

0 comments on commit ef2faf6

Please sign in to comment.