{"push_id":735368747,"size":10,"distinct_size":10,"ref":"refs/heads/master","head":"880766c4e61815ecd691be8c29c58d2f6d7b11a3","before":"b84dc275e82b89b962c9f4a10f7c61df7d7674a0","commits":[{"sha":"276ffa0f02680c1bf38769d74379cedb8ec5dbf5","author":{"email":"bfa11db0f8e459e3f351c54cdccd878b2350ce83@ollix.com","name":"Olli Wang"},"message":"Code refactoring.\n\nThis commit primarily fixes the coding style to meet Google's C++ style guide with few exceptions including:\n\n    * No directory specified when including the `JNI.h` file\n    * Uses the unapproved `chrono` C++11 header in `Clock.h`\n\nA `tools/cclint.sh` script is also created to automate the lint process for convenience.\n\nIn addition to the style fix, there are some other changes described as follow to make the code work better.\n\n    * A `cpplint.sh` script is added to use Google's `cpplint.py` script to check if the coding style matched Google's style guide.\n    * The GYP configuration files are updated to eliminate warning messages from the generated Xcode project.\n    * Drops the use of the `mutex` C++11 header as it is unapproved by Google's C++ style guide.\n    * Calling functions defined in `nanovg_hook.h` now includes the `moui` namespace to distinguish native nanovg functions.\n    * The `moui` namespace is prepended to all function calls defined in `nanovg_hook.h`.\n    * A new `moui::nvgDeleteImage()` function is implemented to delete the image and reset the image id at the same time.\n    * The `NVG_STENCIL_STROKES` parameter is added to the `nvgCreateGL()` call for better rendering result.\n    * The `Widget` class now makes sure the animation is stopped in the destructor.\n    * `Widget::BeginFramebufferUpdates()` now creates a new framebuffer if the passed one does not match to the expected size.\n    * A new `tag_` property has been added to the `Widget` class that can be set to an arbitrary integer and use that number to identify the widget later.\n    * `Widget::AddChild()` is changed to do nothing if the child's real parent is already the current widget.\n    * Adds `GetScaledWidth()` and `GetScaledHeight()` methods to the `Widget` class.\n    * 0 will be applied if setting widget's width or height to negative values.\n    * Fixes the bug that `ScrollView`'s scroll direction was not locked properly when moving the content view.\n    * Updates `ScrollView::SetContentViewSize()` to ignore negative values.\n    * The `is_animating` properties of the `horizontal_animation_state_` and the `vertical_animation_state_` defined in `ScrollView` now are initialized to `false` by default, or error may happen.\n    * Moves `Button::EdgeInset` struct to the `base.h` header file.\n    * Updates `Label` class to always deal with integer font size. This would reduce the required memory for allocating text atlas.\n    * Fixes the bug that memory allocated by `malloc()` should be released by `free()` instead of the `delete` keyword.\n    * Fixes the issue that some variables may not initialized properly, which may cause unpredictable results.","distinct":true,"url":"https://api.github.com/repos/ollix/moui/commits/276ffa0f02680c1bf38769d74379cedb8ec5dbf5"},{"sha":"cc9c5ff85fbcceb8a4fc8ab774a8bdecd9ad68b5","author":{"email":"bfa11db0f8e459e3f351c54cdccd878b2350ce83@ollix.com","name":"Olli Wang"},"message":"Improves the `MOOpenGLView` class for iOS.\n\nThis commit includes several improvements to the `MOOpenGLView` class designed for iOS.\n\n    * The iOS' `View` class drops the use of the `MOOpenGLViewController` so the `MOOpenGLView` class is not instantiated directly.\n    * Separates the code between creating and binding framebuffers/renderbuffers.\n    * Fixes the issue that some objects may not released properly in the `dealloc` method.\n    * Unregisters observed notifications in the `dealloc` method.\n    * Fixes the potential \"terminated due to memory error\" app crash by removing the `[EAGLContext setCurrentContext:nil]` statemenet from the `render` method.","distinct":true,"url":"https://api.github.com/repos/ollix/moui/commits/cc9c5ff85fbcceb8a4fc8ab774a8bdecd9ad68b5"},{"sha":"4ad94d291c2a6cee5b8e2010b8446cb5b05db0da","author":{"email":"bfa11db0f8e459e3f351c54cdccd878b2350ce83@ollix.com","name":"Olli Wang"},"message":"Support for handling memory warning on iOS.\n\nThis commit implements the `View::HandleMemoryWarning()` method that will be called whenever the app receives a memory warning notification. Currently this method only works for iOS.\n\nThe `WidgetView` class overrides this method to pass the warning notification to all of its managed widgets recursively through widget's own `Widget::HandleMemoryWarning()` method.\n\nBesides, both the `Widget` and `Button` classes have implmeneted this method to free their managed framebuffers.","distinct":true,"url":"https://api.github.com/repos/ollix/moui/commits/4ad94d291c2a6cee5b8e2010b8446cb5b05db0da"},{"sha":"ac74121912d6aad71c11c16bb737cb993e143857","author":{"email":"bfa11db0f8e459e3f351c54cdccd878b2350ce83@ollix.com","name":"Olli Wang"},"message":"Reduces the complexity of the `WidgetView` class.\n\nThis commit removes some methods from the `WidgetView` class that was used to simulate the `Widget` class' functionalities. This change would reduce the complexity of the design pattern.","distinct":true,"url":"https://api.github.com/repos/ollix/moui/commits/ac74121912d6aad71c11c16bb737cb993e143857"},{"sha":"e0af4be485e00bc63881c3a0b8719d5fd17adc01","author":{"email":"bfa11db0f8e459e3f351c54cdccd878b2350ce83@ollix.com","name":"Olli Wang"},"message":"Support for getting snapshot of widgets.\n\nThis commit implemenets the new `Widget::GetSnapshot()` method to return the widget's snapshot image. To achieve this work, a `WidgetView::Render()` overloading method is created to accept any managed widget as the root widget for rendering. The `Widget` class takes advantage of this change to render the widget itself to a newly created framebuffer. Once done, the snapshot pixels are read out from the framebuffer, and the framebuffer is deleted immediately afterward.","distinct":true,"url":"https://api.github.com/repos/ollix/moui/commits/e0af4be485e00bc63881c3a0b8719d5fd17adc01"},{"sha":"471197c5338d570233c1aa5ba478754888397acf","author":{"email":"bfa11db0f8e459e3f351c54cdccd878b2350ce83@ollix.com","name":"Olli Wang"},"message":"Allows to render button's highlighted state as normal state.\n\nThis commit adds a new `Style::kNone` constant to the `Button` class that is used to render the button's highlighted state as the normal state.","distinct":true,"url":"https://api.github.com/repos/ollix/moui/commits/471197c5338d570233c1aa5ba478754888397acf"},{"sha":"892dd74a3d72b7b321dc76683aff4e5d95216091","author":{"email":"bfa11db0f8e459e3f351c54cdccd878b2350ce83@ollix.com","name":"Olli Wang"},"message":"Updates layout widgets to respect children's alignment and offset.\n\nThis commit fixes the issue that widget's alignment and offset are not respected once added to a layout widget. To remedy this situation, the `Layout` class is changed to wrap managed widgets in so-called \"cells\".\n\nEach cell is simply a widget that reserves the required space for each managed widget, and the `ArrangeCells()` method now takes control of changing the bounds of each cell. In order to know what size for a managed widget should be reserved, a new `GetOccupiedSpace()` method is also added to the `Widget` class to do the calculation.","distinct":true,"url":"https://api.github.com/repos/ollix/moui/commits/892dd74a3d72b7b321dc76683aff4e5d95216091"},{"sha":"fd072edd4e0353929c3742faaa8c431063ba56e6","author":{"email":"bfa11db0f8e459e3f351c54cdccd878b2350ce83@ollix.com","name":"Olli Wang"},"message":"Support for updating `Label`'s width to fit text.\n\nThis commit implements the new `UpdateWidthToFitText()` method for the `Label` class to update the label's width to fit its text. This method uses nanovg's `nvgTextBounds()` function to determine the required minimum width for the text. However, neither the returned value nor the difference between `xmax` and `xmin` values of the `bounds` parameter can always give the accurate width. As a workaround, the value whichever is greater is used as the text's width.","distinct":true,"url":"https://api.github.com/repos/ollix/moui/commits/fd072edd4e0353929c3742faaa8c431063ba56e6"},{"sha":"7bbd0bbe99a6c8a823a3cbcfd871f133384d1daa","author":{"email":"bfa11db0f8e459e3f351c54cdccd878b2350ce83@ollix.com","name":"Olli Wang"},"message":"Improves the implementation of the `ScrollView` class.\n\nThis commit changes the implementation of the `ScrollView` class heavily to simplify the code and provide better user experience. It also changes the `WidgetView::HandleEvent()` method to improve how event responders work with underlying `ScrollView` widgets. The following describes various changes made to the `ScrollView` class.\n\nThe deceleration to stop content view gradually now is specified as the new `deceleration_rate_` property. The actual deceleration is calculated by multiplying the rate by the desired initial velocity. Besides, the `kScrollVelocityFactor` has been removed to adapt this change.\n\nAs long as `enables_paging_` is `true`, the scroll view now always stops on multiples of the scroll view's bounds when the user scrolls. Also, the `always_scroll_to_next_page_` property now is set to `false` by default to adapt this change.\n\nImproves the feels of animating the content view, including switching between pages, stopping the view gradually, and the bounce effects.\n\nThe `GetContentViewOffset()` and `SetContentViewOffset()` methods are preserved for outside use. The class now only deals with content view's \"origin\" internally.\n\nThe scroll velocity now is calculated based on the accepted directions. If either horizontal or vertical direction is accepted but not both, the displacement now is determined by the distance of the two event locations.\n\nA new `always_scroll_both_directions_` property is added to allow to lock the scroll direction to a specific direction or not.\n\nThe `event_history_` won't be cleared every time the \"up\" or \"cancel\" events are received so `GetScrollVelocity()` can still work in a overriding method.\n\nThe `IsScrolling()` method is replaced by the `is_scrolling_` property and the value is managed by the `HandleEvent()` method.\n\nThe `Scroller` class is also changed to redraw itself only if it has to.\n\nSome bugs are fixed for the `ResolveContentViewOrigin()` method.\n\nIn addition, all `double` types are changed to `float` types. And some unnecessary methods are removed.","distinct":true,"url":"https://api.github.com/repos/ollix/moui/commits/7bbd0bbe99a6c8a823a3cbcfd871f133384d1daa"},{"sha":"880766c4e61815ecd691be8c29c58d2f6d7b11a3","author":{"email":"bfa11db0f8e459e3f351c54cdccd878b2350ce83@ollix.com","name":"Olli Wang"},"message":"Adds transition effect to buttons.\n\nThis commit implements the transition effect for the `Button` widget. The transition happens when a finger dragged into the bounds of the button or from within a button to outside it bounds. More specifically, the transition happens when the button's control state changed between \"highlighted\" and \"normal\" states, or between \"highlighted state\" and \"selected\" states.\n\nTo support this feature, `TransitionBetweenControlStates()` and `StopTransitioningBetweenControlStates()` methods are created to start or end the transition. And the new `RenderFramebufferForTransition()` method is responsible for rendering the button's state while transitioning.","distinct":true,"url":"https://api.github.com/repos/ollix/moui/commits/880766c4e61815ecd691be8c29c58d2f6d7b11a3"}]}