Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[둘리] 뷰 챌린지 미션 2단계 제출합니다. #38

Merged
merged 28 commits into from
Oct 11, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
dc16a7d
feat: button bindingAdapter로 isSelected 생성
hyemdooly Oct 9, 2023
dee7ae1
feat: 선택된 버튼 색깔 생성
hyemdooly Oct 9, 2023
74f09cb
feat: 브러쉬 요소 추가
hyemdooly Oct 9, 2023
4e324fd
feat: 브러쉬 선택 기능 UI 추가
hyemdooly Oct 9, 2023
2e8ae10
feat: 함수 일부 네이밍 변경 및 Circle, Rectangle 그리기 기능 추가
hyemdooly Oct 9, 2023
4c813d6
refactor: 함수 분리 및 중복 코드 삭제
hyemdooly Oct 9, 2023
c56475f
feat: 지우개 기능 구현
hyemdooly Oct 9, 2023
dc53032
refactor: Drawing 클래스에서 Path, Paint 복사하도록 수정
hyemdooly Oct 9, 2023
7da23af
feat: 전체 삭제, undo, redo 구현
hyemdooly Oct 9, 2023
e22dfd6
refactor: 함수 순서 수정
hyemdooly Oct 9, 2023
87daa31
refactor: SettingState sealed class -> enum class로 변경, 상수 위치 이동
hyemdooly Oct 9, 2023
0b210df
refactor: width로 굵기 네이밍 통일
hyemdooly Oct 9, 2023
943e72c
refactor: Brush -> Tool로 네이밍 변경
hyemdooly Oct 10, 2023
1cf3673
refactor: enum class 상수 네이밍 변경
hyemdooly Oct 10, 2023
316933e
refactor: Drawing 클래스 세분화
hyemdooly Oct 10, 2023
2d10fa3
refactor: tool이 drawing 객체를 리턴하도록 수정
hyemdooly Oct 10, 2023
f67b8ac
refactor: CanvasView가 하던 일을 Drawing 클래스로 이동
hyemdooly Oct 11, 2023
ee553e0
refactor: undo, redo 코드 줄 수 줄이기
hyemdooly Oct 11, 2023
cd6ff78
design: 도구에 따른 설정 화면 변경
hyemdooly Oct 11, 2023
dd8e201
refactor: 도구에 따라 버튼 동적 생성
hyemdooly Oct 11, 2023
26e18fe
refactor: brushes -> tools로 네이밍 수정
hyemdooly Oct 11, 2023
f412171
refactor: 함수명 수정
hyemdooly Oct 11, 2023
acb317f
refactor: tool 바꿀 때 설정창 닫도록 수정
hyemdooly Oct 11, 2023
f55275e
fix: Rectangle 버그 수정
hyemdooly Oct 11, 2023
b10fda7
refactor: 도구 모음 일치
hyemdooly Oct 11, 2023
d4a46c4
refactor: tool -> drawingTool로 네이밍 변경
hyemdooly Oct 11, 2023
1d90521
refactor: Drawings 일급컬렉션 생성
hyemdooly Oct 11, 2023
1264668
refactor: 팩토리 함수 삭제
hyemdooly Oct 11, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
refactor: width로 굵기 네이밍 통일
  • Loading branch information
hyemdooly committed Oct 9, 2023
commit 0b210df0719e70ab995714a90b059a7ddd73b500
8 changes: 4 additions & 4 deletions app/src/main/java/woowacourse/paint/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,10 @@ class MainActivity : AppCompatActivity() {
}

private fun setupWidthSlider() {
binding.rsThicknessChanger.valueFrom = MainViewModel.MIN_WIDTH
binding.rsThicknessChanger.valueTo = MainViewModel.MAX_WIDTH
binding.rsThicknessChanger.setValues(viewModel.width.value)
binding.rsThicknessChanger.addOnChangeListener(
binding.rsWidthChanger.valueFrom = MainViewModel.MIN_WIDTH
binding.rsWidthChanger.valueTo = MainViewModel.MAX_WIDTH
binding.rsWidthChanger.setValues(viewModel.width.value)
binding.rsWidthChanger.addOnChangeListener(
RangeSlider.OnChangeListener { _, value, _ ->
viewModel.pickWidth(value)
},
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,13 @@
android:id="@+id/cv_canvas"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintBottom_toTopOf="@id/rs_thickness_changer"
app:layout_constraintBottom_toTopOf="@id/rs_width_changer"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tb_paint" />

<com.google.android.material.slider.RangeSlider
android:id="@+id/rs_thickness_changer"
android:id="@+id/rs_width_changer"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:visibility="@{viewModel.paintChangingState == PaintChangingState.WidthChanging ? View.VISIBLE : View.GONE}"
Expand Down