Well, the firs sentence is a question, so the first person is mostly asking about the size, not fashion ( like in suits you? ) so queda ( from spanish verb "quedar" that in many other cases will means "to stay" ) will mean fit
so
- Does that hat fits you?
- Yes, it fits ok!